libgda-6.0
Description:
Libgda is a (relatively small) database access library.
Content:
Namespaces:
- Gda
- Batch
- Binary
- Blob - Represents some binary data, accessed through a BlobOp object.
- BlobOp
- BlobOpFunctions
- Column
- Config
- Connection
- ConnectionEvent
- DataAccessWrapper
- DataComparator
- DataModelArray
- DataModelDir
- DataModelImport
- DataModelImportIter
- DataModelIter
- DataModelSelect
- DataPivot
- DataProxy
- DataSelect
- DataSelectIter
- DbBase
- DbCatalog
- DbColumn
- DbFkey
- DbIndex
- DbIndexField
- DbTable
- DbView
- Default
- Diff
- DsnInfo - This structure defines the properties of a named data source (DSN).
- GeometricPoint
- HandlerBin
- HandlerBoolean
- HandlerNumerical
- HandlerString
- HandlerText
- HandlerTime
- HandlerType
- Holder
- MetaContext - The <structname> GdaMetaContext</structname> represents a meta data modification context: the <emphasis>how</emphasis> when used with modify_with_context, and the <emphasis>what< /emphasis> when used with update_meta_store.
- MetaStore
- MetaStoreChange
- MetaStruct
- Null
- Numeric - Holds numbers represented as strings.
- PStmt
- ProviderInfo - This structure holds the information associated to a database provider as discovered by Libgda.
- QuarkList
- RepetitiveStatement
- Row
- ServerOperation
- ServerOperationCreateTableArg
- ServerOperationCreateTableArgFKeyRefField
- ServerOperationNode
- ServerProvider
- ServerProviderBase - Functions implementing basic features.
- ServerProviderConnectionData - Opaque structure extended by database providers to store per-connection information (usually C handles to the connection as required by the C API they use).
- Set
- SetGroup - Since 5.2, you must consider this struct as opaque.
- SetNode - Since 5.2, you must consider this struct as opaque.
- SetSource - Since 5.2, you must consider this struct as opaque.
- Short
- SqlAnyPart - Base structure of which all structures (except SqlStatement) "inherit".
- SqlBuilder
- SqlCase - This structure represents a CASE WHEN... construct
- SqlExpr - This structure contains any expression,
either as a value (the
value
part is set), a variable (theparam_spec
is set), or as other types of expressions. - SqlField - This structure represents the name of a table's field.
- SqlFunction - This structure represents a function or an aggregate with zero or more arguments.
- SqlOperation - This structure represents an operation between one or more operands.
- SqlParamSpec
- SqlParser
- SqlSelectField - This structure represents a selected item in a SELECT statement (when executed, the returned data set will have one column per selected item).
- SqlSelectFrom - This structure represents the FROM clause of a SELECT statement, it lists targets and joins
- SqlSelectJoin - This structure represents a join between two targets in a SELECT statement.
- SqlSelectOrder - This structure represents the ordering of a SELECT statement.
- SqlSelectTarget - This structure represents a target used to fetch data from in a SELECT statement; it can represent a table or a sub select.
- SqlStatement - This structure is the top level structure encapsulating several type of statements.
- SqlStatementContentsInfo - Contents' infos
- SqlTable - This structure represents the name of a table.
- Statement
- Text
- Time - Represents a time information.
- TransactionStatus
- TransactionStatusEvent
- Tree
- TreeManager
- TreeMgrColumns
- TreeMgrLabel
- TreeMgrSchemas
- TreeMgrSelect
- TreeMgrTables
- TreeNode
- UShort
- Worker
- XaTransaction
- XaTransactionId
- MetaDbObject - Struture to hold information about each database object (tables, views, ...), its contents must not be modified.
- MetaTable - This structure specifies a MetaDbObject to represent a table's specific attributes, its contents must not be modified.
- MetaTableColumn - This structure represents a table of view's column, its contents must not be modified.
- MetaTableForeignKey - This structure represents a foreign key constraint, its contents must not be modified.
- MetaView - This structure specifies a MetaDbObject to represent a view's specific attributes, its contents must not be modified.
- ServerProviderHandlerInfo
- SqlBuilderId
- SqlParserIface
- SqlStatementCheckValidityData - Validation against a dictionary
- SqlStatementCompound
- SqlStatementDelete
- SqlStatementInsert - The statement is an INSERT statement, any kind of INSERT statement can be represented using this structure (if this is not the case then report a bug).
- SqlStatementSelect
- SqlStatementTransaction - The statement is a transaction management related statement (BEGIN, ROLLBACK, etc).
- SqlStatementUnknown - Represents any statement which type is not identified (any DDL statement or database specific dialect)
- SqlStatementUpdate
- BatchError
- ConfigError
- ConnectionError
- ConnectionEventCode
- ConnectionEventType
- ConnectionFeature - Used in supports_feature and supports_feature to test if a connection or a database provider supports some specific feature.
- ConnectionMetaType - Used with
gda_connection_get_meta_store_data
to describe what meta data to extract from a connection's associated MetaStore. - ConnectionOptions - Specifies some aspects of a connection when opening it.
- ConnectionStatus - Indicates the current status of a connection.
- DataComparatorError
- DataModelAccessFlags
- DataModelHint
- DataModelIOFormat - Format to use when exporting a data model, see export_to_string and export_to_file
- DataModelIterError
- DataPivotAggregate - Possible operations for the data fields.
- DataPivotError - Possible DataPivot related errors.
- DataPivotFieldType - Define types of field to be used when defining a DataPivot analysis.
- DataProxyError
- DataSelectConditionType - Defines what criteria compute_modification_statements_ext uses to uniquely identify a single row in a table when creating modification statements.
- DataSelectError
- DbCatalogError - These error are primary for developers to troubleshoot the problem rather than for user.
- DbColumnError - Values used to describe the source of the error.
- DbFkeyReferenceAction - Specify numeric value for the actions, e.
- DbIndexError
- DbIndexSortOrder - Enum values to specify the sorting
- DbTableError
- DbViewRefAction
- DiffType
- HolderError
- MetaDbObjectType - Type of database object which can be handled as a MetaDbObject
- MetaForeignKeyPolicy - Defines the filtering policy of a foreign key when invoked on an UPDATE or DELETE operation.
- MetaGraphInfo
- MetaSortType - Types of sorting
- MetaStoreChangeType
- MetaStoreError
- MetaStructError
- MetaStructFeature - Controls which features are computed about database objects.
- ServerOperationCreateTableFlag
- ServerOperationError
- ServerOperationNodeStatus
- ServerOperationNodeType
- ServerOperationType
- ServerProviderError
- ServerProviderFunctionsType - Represents the different types of sets of virtual functions which can be implemented for each provider
- ServerProviderMetaType
- SetError
- SqlAnyPartType - Type of part.
- SqlBuilderError
- SqlIdentifierStyle - Specifies how SQL identifiers are represented by a specific database
- SqlOperatorType
- SqlParserError
- SqlParserFlavour
- SqlParserMode
- SqlSelectJoinType
- SqlStatementCompoundType
- SqlStatementType - Known types of statements
- StatementError
- StatementModelUsage - These flags specify how the DataModel returned when executing a Statement will be used
- StatementSqlFlag - Specifies rendering options
- TransactionIsolation - Describes transactions' isolation level
- TransactionStatusEventType
- TransactionStatusState
- TreeError
- TreeManagerError
- TreeNodeError
- ValueAttribute - Attributes of a value, used internally by Libgda in different contexts.
- XaTransactionError
- XaType
- public const string ATTRIBUTE_AUTO_INCREMENT
The corresponding attribute specifies if the object it refers to is auto incremented (value has a G_TYPE_BOOLEAN type).
- public const string ATTRIBUTE_DESCRIPTION
The corresponding attribute is the description of the object it refers to (value has a G_TYPE_STRING type).
- public const string ATTRIBUTE_IS_DEFAULT
The corresponding attribute specifies if the object it refers to has its value to default (value has a G_TYPE_BOOLEAN type).
- public const string ATTRIBUTE_NAME
The corresponding attribute is the name of the object it refers to (value has a G_TYPE_STRING type).
- public const string ATTRIBUTE_NUMERIC_PRECISION
The corresponding attribute is the number of significant digits of the object it refers to (value has a G_TYPE_INT type).
- public const string ATTRIBUTE_NUMERIC_SCALE
The corresponding attribute is the number of significant digits to the right of the decimal point of the object it refers to (value has a G_TYPE_INT type).
- public const string ATTRIBUTE_TREE_NODE_UNKNOWN_CHILDREN
This attribute, if true specifies that a tree node may or may not have any children nodes (value has a G_TYPE_BOOLEAN type).
- public const string EXTRA_AUTO_INCREMENT
- public const string SQLSTATE_GENERAL_ERROR
- public const string SQLSTATE_NO_ERROR
- public const int TIMEZONE_INVALID
- public delegate void ConnectionOpenFunc (Connection cnc, uint job_id, bool result, Error error, void* data)
- public delegate bool SqlForeachFunc (SqlAnyPart part, void* data) throws Error
Specifies the type of functions passed to @foreach.
- public delegate bool SqlReservedKeywordsFunc (string word)
- public delegate TreeNode TreeManagerNodeFunc (TreeManager manager, TreeNode? parent, string? name)
- public delegate SList<unowned TreeNode> TreeManagerNodesFunc (TreeManager manager, TreeNode? node, SList<TreeNode> children_nodes, out bool out_error) throws Error
- public delegate void WorkerCallback (Worker worker, uint job_id, void* result_data, Error error)
- public delegate void* WorkerFunc () throws Error
Specifies the type of function to be passed to submit_job, do_job and wait_job.
- public string? alphanum_to_text (string text)
Does the opposite of text_to_alphanum, in the same string
- public string[]? completion_list_get (Connection cnc, string sql, int start, int end)
Creates an array of strings (terminated by a null) corresponding to possible completions.
- public bool compute_dml_statements (Connection cnc, Statement select_stmt, bool require_pk, out Statement? insert_stmt, out Statement? update_stmt, out Statement? delete_stmt) throws Error
Creates an INSERT, an UPDATE and a DELETE statement from a SELECT statement using the database metadata available in
cnc
's meta store. - public SqlStatement? compute_select_statement_from_update (Statement update_stmt) throws Error
Computes a SELECT statement which selects all the rows the
update_stmt
would update. - public SqlExpr? compute_unique_table_row_condition (SqlStatementSelect stsel, MetaTable mtable, bool require_pk) throws Error
Computes a SqlExpr expression which can be used in the WHERE clause of an UPDATE or DELETE statement when a row from the result of the
stsel
statement has to be modified. - public SqlExpr? compute_unique_table_row_condition_with_cnc (Connection? cnc, SqlStatementSelect stsel, MetaTable mtable, bool require_pk) throws Error
Computes a SqlExpr expression which can be used in the WHERE clause of an UPDATE or DELETE statement when a row from the result of the
stsel
statement has to be modified. - public DataHandler data_handler_get_default (Type for_type)
- public DateTime date_time_copy (DateTime ts)
- public string? default_escape_string (string string)
Escapes
string
to make it understandable by a DBMS. - public string? default_unescape_string (string string)
Do the reverse of default_escape_string: transforms any "''" into "'", any "\\" into "\" and any "\'" into "'".
- public void dsn_split (string string, string out_dsn, string out_username, string out_password)
Extract the DSN, username and password from
string
. - public Type g_type_from_string (string str)
Converts a named type to ts GType type (also see the g_type_to_string function).
- public unowned string g_type_to_string (Type type)
Converts a GType to its string representation (use g_type_from_string for the operation in the other direction).
- public bool identifier_equal (string id1, string id2)
Does the same as strcmp(
id1
,id2
), but handles the case where id1 and/or id2 are enclosed in double quotes. - public uint identifier_hash (string id)
computes a hash string from
id
, to be used in hash tables as a HashFunc - public void log_disable ()
Disables GDA logs.
- public void log_enable ()
Enables GDA logs.
- public bool log_is_enabled ()
- public bool parse_formatted_date (Date gdate, string value, DateDMY first, DateDMY second, DateDMY third, char sep)
This function is similar to parse_iso8601_date (with
first
beingG_DATE_YEAR
,second
beingG_DATE_MONTH
,third
beingG_DATE_DAY
andsep
being '-') but allows one to specify the expected date format. - public Time parse_formatted_time (string value, char sep)
- public DateTime? parse_formatted_timestamp (string value, DateDMY first, DateDMY second, DateDMY third, char sep)
This function is similar to DateTime.from_iso8601 (with
first
beingG_DATE_YEAR
,second
beingG_DATE_MONTH
,third
beingG_DATE_DAY
andsep
being '-') but allows one to specify the expected date format. - public bool parse_iso8601_date (Date gdate, string value)
Extracts date parts from
value
, and setsgdate
's contents - public Time parse_iso8601_time (string value)
Extracts time parts from
value
, and setstimegda
's contents - public SqlStatement? rewrite_sql_statement_for_null_parameters (owned SqlStatement sqlst, Set @params, out bool out_modified) throws Error
Modifies
sqlst
to take into account any parameter which might be null: ifsqlst
contains the equivalent of "xxx = <parameter definition>" and if that parameter is inparams
and its value is of type GDA_TYPE_NUL, then that part is replaced with "xxx IS NULL". - public bool rewrite_statement_for_null_parameters (Statement stmt, Set @params, out Statement? out_stmt) throws Error
Modifies
stmt
to take into account any parameter which might be null: ifstmt
contains the equivalent of "xxx = <parameter definition>" and if that parameter is inparams
and its value is of type GDA_TYPE_NUL, then that part is replaced with "xxx IS NULL". - public bool rfc1738_decode (string string)
Decodes
string
using the RFC 1738 recommendations: the < constant><>"#%{}|\^~[]'`;/?:@=&</constant> and space characters are replaced by < constant>"%ab"</constant> where <constant>ab</constant> is the hexadecimal number corresponding to the character. - public string? rfc1738_encode (string string)
Encodes
string
using the RFC 1738 recommendations: the < constant><>"#%{}|\^~[]'`;/?:@=&</constant> and space characters are replaced by < constant>"%ab"</constant> where <constant>ab</constant> is the hexadecimal number corresponding to the character. - public Statement select_alter_select_for_empty (Statement stmt) throws Error
Creates a new Statement, selecting the same data as
stmt
, but which always returns an empty (no row) data model. - public string sql_identifier_force_quotes (string str)
Add double quotes around the
str
identifier. - public string sql_identifier_prepare_for_compare (string str)
Prepares
str
to be compared: <itemizedlist> < listitem><para>if surrounded by double quotes or single quotes, then just remove the quotes</para></listitem> < listitem><para>otherwise convert to lower case</para></listitem> </itemizedlist> - public string? sql_identifier_quote (string id, Connection? cnc, ServerProvider? prov, bool meta_store_convention, bool force_quotes)
Use this function for any SQL identifier to make sure that: < itemizedlist> <listitem> <para>it is correctly formatted to be used with
cnc
(ifcnc
is null, then some default SQL quoting rules will be applied, similar to PostgreSQL's way) iffor_meta_store
is false; </para> </listitem> <listitem> <para>it is correctly formatted to be used with the MetaStore's object associated tocnc
isfor_meta_store
is true. - public string[]? sql_identifier_split (string id)
Splits
id
into an array of it sub parts. - public SqlOperatorType sql_operation_operator_from_string (string op)
Returns SqlOperatorType that correspond with the string
op
. - public unowned string sql_operation_operator_to_string (SqlOperatorType op)
Returns a constant string representing a operator name.
- public SqlStatementType sql_statement_string_to_type (string type)
Converts a string to a SqlStatementType value, see also to_string
- public string sql_value_stringify (Value value)
Simplified version of value_stringify.
- public Binary string_to_binary (string? str)
Performs the reverse of to_string (note that for any "\xyz" succession of 4 characters where "xyz" represents a valid octal value, the resulting read value will be modulo 256).
- public Blob string_to_blob (string str)
Performs the reverse of to_string.
- public string text_to_alphanum (string text)
The "encoding" consists in replacing non alphanumeric character with the string "__gdaXX" where XX is the hex.
- public bool utility_check_data_model_v (DataModel model, Type[] types)
Check the column types of a GdaDataModel.
- public bool utility_data_model_dump_data_to_xml (DataModel model, unowned Node* parent, int[]? cols, int[]? rows, bool use_col_ids)
Dump the data in a DataModel into a xmlNodePtr (as used in libxml).
- public unowned string? utility_data_model_find_column_description (DataSelect model, string field_name)
Finds the description of a field into Metadata from a DataModel.
- public bool utility_holder_load_attributes (Holder holder, unowned Node* node, SList<DataModel>? sources) throws Error
Note: this method may set the "source" custom string property
- public int value_compare (Value value1, Value value2)
Compares two values of the same type, with the exception that a value of any type can be compared to a GDA_TYPE_NULL value, specifically: <itemizedlist> <listitem><para>if
value1
andvalue2
are both GDA_TYPE_NULL values then the returned value is 0</para></listitem> <listitem><para >ifvalue1
is a GDA_TYPE_NULL value andvalue2
is of another type then the returned value is -1</para> </listitem> <listitem><para>ifvalue1
is of another type andvalue2
is a GDA_TYPE_NULL value then the returned value is 1</para></listitem> <listitem><para>in all other cases,value1
andvalue2
must be of the same type and their values are compared</para></listitem> </itemizedlist> - public Value? value_copy (Value value)
Creates a new Value from an existing one.
- public int value_differ (Value value1, Value value2)
Tells if two values are equal or not, by comparing memory representations.
- public void value_free (owned Value? value)
Deallocates all memory associated to a Value.
- public unowned Binary value_get_binary (Value value)
- public unowned Blob value_get_blob (Value value)
- public unowned GeometricPoint value_get_geometric_point (Value value)
- public unowned MetaStoreChange value_get_meta_store_change (Value value)
- public unowned Numeric value_get_numeric (Value value)
- public short value_get_short (Value value)
- public unowned Time value_get_time (Value value)
- public ushort value_get_ushort (Value value)
- public bool value_is_null (Value value)
Tests if a given
value
is of typeGDA_TYPE_NULL
. - public bool value_is_number (Value value)
Gets whether the value stored in the given Value is of numeric type or not.
- public Value? value_new (Type type)
- public Value? value_new_binary (owned uint8 val, long size)
Makes a new Value of type
GDA_TYPE_BINARY
with valueval
. - public Value? value_new_blob (uint8 val, long size)
Makes a new Value of type
GDA_TYPE_BLOB
with the data contained byval
. - public Value? value_new_blob_from_file (string filename)
Makes a new Value of type
GDA_TYPE_BLOB
interfacing with the contents of the file namedfilename
- public Value? value_new_date_time_from_timet (long val)
- public Value? value_new_default (string? default_val)
Creates a new default value.
- public Value? value_new_from_string (string as_string, Type type)
Makes a new Value of type
type
from its string representation. - public Value? value_new_from_xml (Node node)
Creates a GValue from an XML representation of it.
- public Value? value_new_null ()
- public Value? value_new_time_from_timet (long val)
Makes a new Value of type
GDA_TYPE_TIME
with valueval
(of type time_t). - public void value_reset_with_type (Value value, Type type)
- public void value_set_binary (Value value, Binary binary)
Stores
val
intovalue
. - public void value_set_blob (Value value, Blob blob)
Stores
val
intovalue
. - public bool value_set_from_string (Value value, string as_string, Type type)
Stores the value data from its string representation as
type
. - public bool value_set_from_value (Value value, Value from)
- public void value_set_geometric_point (Value value, GeometricPoint val)
Stores
val
intovalue
. - public void value_set_meta_store_change (Value value, MetaStoreChange change)
- public void value_set_null (Value value)
Sets the type of
value
toGDA_TYPE_NULL
. - public void value_set_numeric (Value value, Numeric val)
Stores
val
intovalue
. - public void value_set_short (Value value, short val)
Stores
val
intovalue
. - public void value_set_time (Value value, Time val)
Stores
val
intovalue
. - public void value_set_ushort (Value value, ushort val)
Stores
val
intovalue
. - public string value_stringify (Value value)
Converts a GValue to its string representation which is a human readable value.
- public void value_take_binary (Value value, owned Binary binary)
Stores
val
intovalue
, but on the contrary to value_set_binary, thebinary
argument is not copied, but used as-is and it should be considered owned byvalue
. - public void value_take_blob (Value value, owned Blob blob)
Stores
val
intovalue
, but on the contrary to value_set_blob, theblob
argument is not copied, but used as-is and it should be considered owned byvalue
. - public string value_to_xml_string (Value value)
This methods creates an XML string representation of a Value
- public Worker worker_new_unique (Worker location, bool allow_destroy)
This function creates a new Worker, or reuses the one at
location
.