20#include "XbaseDriver.h"
22#include "KDbConnection.h"
23#include "KDbDriverManager.h"
24#include "KDbDriverBehavior.h"
28#include "XbaseConnection.h"
32class KDbxBaseDriverPrivate {
44xBaseDriver::xBaseDriver(
QObject *parent,
const QVariantList &args)
46 ,dp( new xBaseDriverPrivate() )
52 beh->
features = SingleTransactions | CursorForward;
57 beh->SPECIAL_AUTO_INCREMENT_DEF =
true;
58 beh->AUTO_INCREMENT_FIELD_OPTION =
"";
59 beh->AUTO_INCREMENT_TYPE =
"INTEGER";
60 beh->AUTO_INCREMENT_PK_FIELD_OPTION =
"PRIMARY KEY";
61 beh->AUTO_INCREMENT_REQUIRES_PK =
true;
62 beh->ROW_ID_FIELD_NAME =
"OID";
63 beh->IS_DB_OPEN_AFTER_CREATE =
true;
65 beh->OPENING_QUOTATION_MARK_BEGIN_FOR_IDENTIFIER =
'"';
66 beh->CLOSING_QUOTATION_MARK_BEGIN_FOR_IDENTIFIER =
'"';
67 beh->SELECT_1_SUBQUERY_SUPPORTED =
true;
70 beh->_1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=
false;
72 initDriverSpecificKeywords(keywords);
80 beh->typeNames[KDbField::Date]=
"Date";
81 beh->typeNames[KDbField::DateTime]=
"DateTime";
82 beh->typeNames[KDbField::Time]=
"Time";
90xBaseDriver::~xBaseDriver()
98 if ( !dp->internalDriver ) {
101 return new xBaseConnection(
this, dp->internalDriver, connData, options);
104bool xBaseDriver::isSystemObjectName(
const QString& n )
const
106 if ( !dp->internalDriver ) {
109 return dp->internalDriver->isSystemObjectName(n);
112bool xBaseDriver::isSystemDatabaseName(
const QString& n)
const
118bool xBaseDriver::drv_isSystemFieldName(
const QString& n )
const
120 if ( !dp->internalDriver ) {
123 return dp->internalDriver->isSystemFieldName(n);
128 if ( !dp->internalDriver ) {
131 return dp->internalDriver->escapeString(str);
136 if ( !dp->internalDriver ) {
139 return dp->internalDriver->escapeString(str);
144 if ( !dp->internalDriver ) {
147 return dp->internalDriver->escapeBLOB(array);
152 if ( !dp->internalDriver ) {
155 return dp->internalDriver->escapeIdentifier(str);
160 if ( !dp->internalDriver ) {
163 return dp->internalDriver->escapeIdentifier(str);
Database specific connection data, e.g. host, port.
Generic options for a single connection. The options are accessible using key/value pairs....
Provides database connection, allowing queries and data modification.
A driver manager for finding and loading driver plugins.
KDbDriver * driver(const QString &id)
Database driver's abstraction.
Specialized string for escaping.
#define K_PLUGIN_CLASS_WITH_JSON(classname, jsonFile)
Provides database connection, allowing queries and data modification.
KDB_EXPORT QString defaultFileBasedDriverId()