Flags

Details

class Gda.ConnectionOptions(value)

Bases: GLib.Flags

Specifies some aspects of a connection when opening it.

Additional information about the Gda.ConnectionOptions.SQL_IDENTIFIERS_CASE_SENSITIVE flag:

  • For example without this flag, if the table name specified in a Gda.ServerOperation to create a table is MyTable, then usually the database will create a table named mytable, whereas with this flag, the table will be created as MyTable (note that in the end the database may still decide to name the table mytable or differently if it can’t do otherwise).

  • Libgda will not apply this rule when parsing SQL code, the SQL code being parsed has to be conform to the database it will be used with

Additional information about the Gda.ConnectionOptions.THREAD_SAFE and Gda.ConnectionOptions.THREAD_ISOLATED flags: The Gda.ConnectionOptions.THREAD_SAFE flag specifies that it has to be able to use the returned connection object from several threads at once (locking is ensured by the Gda.Connection itself). Depending on the database provider’s implementation and on the native libraries it uses, the “normal” connection object might not respect this requirement, and in this case a specific thread is started and used as the unique thread which will manipulate the actual connection, while a “wrapper connection” is actually returned and used by the caller (that wrapper connection passes method calls from the calling thread to the actual connection’s specific thread, and gets the results back).

The Gda.ConnectionOptions.THREAD_ISOLATED forces using a specific thread and a “wrapper connection” even if the “normal” connection would itself be thread safe; this is useful for example to be sure the asynchronous API can always be used (see Gda.Connection.async_statement_execute()).

Having a specific thread and a “wrapper connection” definitely has an impact on the performances (because it involves messages passing between threads for every method call), so using the Gda.ConnectionOptions.THREAD_SAFE or Gda.ConnectionOptions.THREAD_ISOLATED flags should be carefully considered.

Note about the Gda.ConnectionOptions.AUTO_META_DATA flag:

  • Every time a DDL statement is successfully executed, the associated meta data, if defined, will be updated, which has a impact on performances

  • If a transaction is started and some DDL statements are executed and the transaction is not rolled back or committed, then the meta data may end up being wrong

NONE = 0

no specific aspect

READ_ONLY = 1

this flag specifies that the connection to open should be in a read-only mode (this policy is not correctly enforced at the moment)

AUTO_META_DATA = 16

this flags specifies that if a Gda.MetaStore has been associated to the connection, then it is kept up to date with the evolutions in the database’s structure. Be aware however that there are some drawbacks explained below.

SQL_IDENTIFIERS_CASE_SENSITIVE = 2

this flag specifies that SQL identifiers submitted as input to Libgda have to keep their case sensitivity.

THREAD_SAFE = 4

this flag specifies that the connection to open will be used by several threads at once so it has to be thread safe

THREAD_ISOLATED = 8

this flag specifies that the connection to open will be used by several threads at once and requests that the real connection be used only in a sub thread created specifically for it

class Gda.DataModelAccessFlags(value)

Bases: GLib.Flags

RANDOM = 1
UPDATE = 16
CURSOR_FORWARD = 2
DELETE = 32
CURSOR_BACKWARD = 4
WRITE = 56
CURSOR = 6
INSERT = 8
class Gda.MetaGraphInfo(value)

Bases: GLib.Flags

META_GRAPH_COLUMNS = 1
class Gda.MetaStructFeature(value)

Bases: GLib.Flags

Controls which features are computed about database objects.

NONE = 0

database objects only have their own attributes

FOREIGN_KEYS = 1

foreign keys are computed for tables

VIEW_DEPENDENCIES = 2

for views, the tables they use are also computed

ALL = 3

all the features are computed

class Gda.ServerOperationCreateTableFlag(value)

Bases: GLib.Flags

NOTHING_FLAG = 1
AUTOINC_FLAG = 16
PKEY_AUTOINC_FLAG = 18
PKEY_FLAG = 2
FKEY_FLAG = 32
NOT_NULL_FLAG = 4
UNIQUE_FLAG = 8
class Gda.SqlIdentifierStyle(value)

Bases: GLib.Flags

Specifies how SQL identifiers are represented by a specific database

LOWER_CASE = 1

case insensitive SQL identifiers are represented in lower case (meaning that any SQL identifier which has a non lower case character is case sensitive)

UPPER_CASE = 2

case insensitive SQL identifiers are represented in upper case (meaning that any SQL identifier which has a non upper case character is case sensitive)

class Gda.StatementModelUsage(value)

Bases: GLib.Flags

These flags specify how the Gda.DataModel returned when executing a Gda.Statement will be used

RANDOM_ACCESS = 1

access to the data model will be random (usually this will result in a data model completely stored in memory)

OFFLINE = 16

specifies that the data model’s contents will be fully loaded into the client side (the memory of the process using Libgda), not requiring the server any more to access the data (the default behaviour is to access the server any time data is to be read, and data is cached in memory). This flag is useful only if used in conjunction with the Gda.StatementModelUsage.RANDOM_ACCESS flag (otherwise an error will be returned).

CURSOR_FORWARD = 2

access to the data model will be done using a cursor moving forward

CURSOR_BACKWARD = 4

access to the data model will be done using a cursor moving backward

CURSOR = 6

access to the data model will be done using a cursor (moving both forward and backward)

ALLOW_NOPARAM = 8

specifies that the data model should be executed even if some parameters required to execute it are invalid (in this case the data model will have no row, and will automatically be re-run when the missing parameters are once again valid)

class Gda.StatementSqlFlag(value)

Bases: GLib.Flags

Specifies rendering options

PARAMS_AS_VALUES = 0

rendering will replace parameters with their values

PRETTY = 1

rendering will include newlines and indentation to make it easy to read

TIMEZONE_TO_GMT = 128

time and timestamp with a timezone information are converted to GMT before rendering, and rendering does not show the timezone information

PARAMS_AS_DOLLAR = 16

parameters will be rendered using the “$<param_number>” syntax where parameters are numbered starting from 1

PARAMS_LONG = 2

parameters will be rendered using the “/&ast; name:&lt;param_name&gt; … &ast;/” syntax

PARAMS_AS_QMARK = 32

parameters will be rendered using the “?<param_number>” syntax where parameters are numbered starting from 1

PARAMS_SHORT = 4

parameters will be rendered using the “##<param_name>…” syntax

PARAMS_AS_UQMARK = 64

parameters will be rendered using the “?” syntax

PARAMS_AS_COLON = 8

parameters will be rendered using the “:<param_name>” syntax

class Gda.ValueAttribute(value)

Bases: GLib.Flags

NONE = 0
IS_NULL = 1
HAS_VALUE_ORIG = 128
IS_UNCHANGED = 16
CAN_BE_NULL = 2
NO_MODIF = 256
ACTIONS_SHOWN = 32
IS_DEFAULT = 4
UNUSED = 512
DATA_NON_VALID = 64
CAN_BE_DEFAULT = 8