KexiDB::DriverBehaviour Class Reference
#include <driver_p.h>
Detailed Description
Detailed definition of driver's default behaviour. Note for driver developers: Change these defaults in you Driver subclass constructor, if needed.
Definition at line 47 of file driver_p.h.
Public Member Functions | |
| DriverBehaviour () | |
Public Attributes | |
| QString | UNSIGNED_TYPE_KEYWORD |
| "UNSIGNED" by default | |
| QString | AUTO_INCREMENT_FIELD_OPTION |
| "AUTO_INCREMENT" by default, used as add-in word to field definition May be also used as full definition if SPECIAL_AUTO_INCREMENT_DEF is true. | |
| QString | AUTO_INCREMENT_PK_FIELD_OPTION |
| "AUTO_INCREMENT PRIMARY KEY" by default, used as add-in word to field definition May be also used as full definition if SPECIAL_AUTO_INCREMENT_DEF is true. | |
| QString | AUTO_INCREMENT_TYPE |
| "" by default, used as type string for autoinc. | |
| bool | SPECIAL_AUTO_INCREMENT_DEF: 1 |
| bool | AUTO_INCREMENT_REQUIRES_PK: 1 |
| QString | ROW_ID_FIELD_NAME |
| bool | ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE: 1 |
| QString | ALWAYS_AVAILABLE_DATABASE_NAME |
| QChar | QUOTATION_MARKS_FOR_IDENTIFIER |
| bool | USING_DATABASE_REQUIRED_TO_CONNECT: 1 |
| bool | _1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY: 1 |
| bool | SELECT_1_SUBQUERY_SUPPORTED: 1 |
| const char ** | SQL_KEYWORDS |
Constructor & Destructor Documentation
|
|
Definition at line 47 of file driver.cpp. |
Member Data Documentation
|
|
True if before we know whether the fetched result of executed query is empty or not, we need to fetch first record. Particularly, it's true for SQLite. The flag is used in Cursor::open(). By default this flag is false. Definition at line 130 of file driver_p.h. Referenced by KexiDB::SQLiteDriver::SQLiteDriver(). |
|
|
Name of any (e.g. first found) database for this connection that typically always exists. This can be not set if we want to do some magic checking what database name is availabe by reimplementing Connection::anyAvailableDatabaseName(). Example: for PostgreSQL this is "template1".
Definition at line 112 of file driver_p.h. Referenced by KexiDB::Connection::anyAvailableDatabaseName(). |
|
|
"AUTO_INCREMENT" by default, used as add-in word to field definition May be also used as full definition if SPECIAL_AUTO_INCREMENT_DEF is true.
Definition at line 57 of file driver_p.h. Referenced by KexiDB::Connection::createTableStatement(), and KexiDB::SQLiteDriver::SQLiteDriver(). |
|
|
"AUTO_INCREMENT PRIMARY KEY" by default, used as add-in word to field definition May be also used as full definition if SPECIAL_AUTO_INCREMENT_DEF is true.
Definition at line 61 of file driver_p.h. Referenced by KexiDB::Connection::createTableStatement(), and KexiDB::SQLiteDriver::SQLiteDriver(). |
|
|
True if autoincrement requires field to be declared as primary key. This is true for SQLite. False by default. Definition at line 75 of file driver_p.h. Referenced by KexiDB::Connection::createTableStatement(), and KexiDB::SQLiteDriver::SQLiteDriver(). |
|
|
"" by default, used as type string for autoinc. field definition pgsql defines it as "SERIAL", sqlite defines it as "INTEGER" Definition at line 65 of file driver_p.h. Referenced by KexiDB::Connection::createTableStatement(), and KexiDB::SQLiteDriver::SQLiteDriver(). |
|
|
Quotation marks used for escaping identifier (see Driver::escapeIdentifier()). Default value is '"'. Change it for your driver. Definition at line 117 of file driver_p.h. Referenced by KexiDB::Driver::escapeIdentifier(), and KexiDB::SQLiteDriver::SQLiteDriver(). |
|
|
Name of a field (or built-in function) with autoincremented unique value, typically returned by Connection::drv_lastInsertRowID(). Examples:
Definition at line 84 of file driver_p.h. Referenced by KexiDB::Connection::deleteRow(), KexiDB::Driver::isSystemFieldName(), KexiDB::Connection::lastInsertedAutoIncValue(), KexiDB::Connection::selectStatement(), KexiDB::SQLiteDriver::SQLiteDriver(), and KexiDB::Connection::updateRow(). |
|
|
True if the value (fetched from field or function, defined by ROW_ID_FIELD_NAME member) is EXACTLY the value of autoincremented field, not an implicit (internal) row number. Default value is false. Examples:
Notes: If it's false, we have a convenient way for identifying row even when there's no primary key defined. So, as '_ROWID' column in MySQL is really just a synonym for the primary key, this engine needs to have primary keys always defined if we want to use interactive editing features like row updating and deleting. Definition at line 102 of file driver_p.h. Referenced by KexiDB::Connection::insertRow(), and KexiDB::Connection::lastInsertedAutoIncValue(). |
|
|
True if "SELECT 1 from (subquery)" is supported. False by default. Used in Connection::resultExists() for optimization. It's set to true for SQLite driver. Definition at line 134 of file driver_p.h. Referenced by KexiDB::Connection::resultExists(), and KexiDB::SQLiteDriver::SQLiteDriver(). |
|
|
True if autoincrement field has special definition e.g. like "INTEGER PRIMARY KEY" for SQLite. Special definition string should be stored in AUTO_INCREMENT_FIELD_OPTION. False by default. Definition at line 71 of file driver_p.h. Referenced by KexiDB::Connection::createTableStatement(), and KexiDB::SQLiteDriver::SQLiteDriver(). |
|
|
Keywords that need to be escaped for the driver. Set this before calling Driver::initSQLKeywords. Definition at line 138 of file driver_p.h. Referenced by KexiDB::Driver::initSQLKeywords(), and KexiDB::SQLiteDriver::SQLiteDriver(). |
|
|
"UNSIGNED" by default
Definition at line 53 of file driver_p.h. Referenced by KexiDB::Connection::createTableStatement(). |
|
|
True if using database is requied to perform real connection. This is true for may engines, e.g. for PostgreSQL, where connections string should contain a database name. This flag is unused for file-based db drivers, by default set to true and used for all other db drivers. Definition at line 125 of file driver_p.h. Referenced by KexiDB::Connection::useTemporaryDatabaseIfNeeded(). |
The documentation for this class was generated from the following files:
