The corresponding attribute is the description of the object it refers to (value has a G_TYPE_STRING type).
The corresponding attribute specifies if the object it refers to has its value to default (value has a G_TYPE_BOOLEAN type).
The corresponding attribute is the name of the object it refers to (value has a G_TYPE_STRING type).
The corresponding attribute is the number of significant digits of the object it refers to (value has a G_TYPE_INT type).
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).
This attribute, if %TRUE specifies that a tree node may or may not have any children nodes (value has a G_TYPE_BOOLEAN type).
Does the opposite of gda_text_to_alphanum(), in the same string
a string
Creates a new #GdaBinary structure from an existing one.
source to get a copy from.
Deallocates all memory associated to the given #GdaBinary.
#GdaBinary to free.
Creates a new #GdaBlob structure from an existing one.
source to get a copy from.
Deallocates all memory associated to the given #GdaBlob.
#GdaBlob to free.
Creates an array of strings (terminated by a %NULL) corresponding to possible completions. If no completion is available, then the returned array contains just one NULL entry, and if it was not possible to try to compute a completions list, then %NULL is returned.
a #GdaConnection object
a partial SQL statement which is the context of the completion proposal
starting position within sql
of the "token" to complete (starts at 0)
ending position within sql
of the "token" to complete
Creates an INSERT, an UPDATE and a DELETE statement from a SELECT statement
using the database metadata available in cnc'
s meta store. Each statements are computed only if
the corresponding place to store the created statement is not %NULL.
a #GdaConnection
a SELECT #GdaStatement (compound statements not handled)
TRUE if the created statement have to use a primary key
a place to store the created INSERT statement, or %NULL
a place to store the created UPDATE statement, or %NULL
a place to store the created DELETE statement, or %NULL
Obtain a pointer to a #GdaDataHandler which can manage #GValue values of type for_type
. The returned
data handler will be adapted to use the current locale information (for example dates will be formatted
taking into account the locale).
The returned pointer is %NULL if there is no default data handler available for the for_type
data type
a #GType type
Escapes string
to make it understandable by a DBMS. The escape method is very common and replaces any
occurrence of "'" with "''" and "" with "\"
string to escape
Do the reverse of gda_default_escape_string(): transforms any "''" into "'", any "\" into "" and any "'" into "'".
string to unescape
Extract the DSN, username and password from string
. in string,
the various parts are strings
which are expected to be encoded using an RFC 1738 compliant encoding. If they are specified,
the returned username and password strings are correctly decoded.
out_username
and out_password
may be set to %NULL depending on string'
s format.
a string in the "[<username>[:<password>]]
<DSN>" form
a place to store the new string containing the <DSN> part
a place to store the new string containing the <username> part
a place to store the new string containing the <password> part
Converts a named type to ts GType type (also see the gda_g_type_to_string() function).
This function is a wrapper around the g_type_from_name() function, but also recognizes
some type synonyms such as:
the name of a #GType, as returned by gda_g_type_to_string().
Converts a GType to its string representation (use gda_g_type_from_string() for the operation in the other direction).
This function wraps g_type_name() but for common types it provides an easier to understand and remember name. For Example the G_TYPE_STRING is converted to "string" whereas g_type_name() converts it to "gchararray".
Type to convert from.
Find the path to the application identified by app_name
. For example if the application
is "gda-sql", then calling this function will return
"/your/prefix/bin/gda-sql-5.0" if Libgda is installed in
the "/your/prefix" prefix (which would usually be "/usr"), and for the ABI version 5.0.
the name of the application to find
Does the same as strcmp(id1
, id2
), but handles the case where id1 and/or id2 are enclosed in double quotes.
can also be used in hash tables as a #GEqualFunc.
an identifier string
an identifier string
computes a hash string from id,
to be used in hash tables as a #GHashFunc
an identifier string
Initializes the GDA library, must be called prior to any Libgda usage.
Please note that if you call setlocale() to modify the current locale, you should also call gda_locale_changed() before using Libgda again.
Call this function whenever the setlocale() function has been called to change the current locale; this function is first called by gda_init() so you don't need to call it if you have set the locale before calling gda_init().
Failing to call this function after having changed the current locale may result in Libgda reverting to the previous set locale.
Disables GDA logs.
Enables GDA logs.
This function is similar to gda_parse_iso8601_date() (with first
being G_DATE_YEAR,
second
being G_DATE_MONTH,
third
being G_DATE_DAY
and sep
being '-') but allows one to specify the expected date format.
a pointer to a #GDate structure which will be filled
a string to be parsed
a #GDateDMY specifying which of year, month or day appears first (in the first bytes) in value
a #GDateDMY specifying which of year, month or day appears second (in the first bytes) in value
a #GDateDMY specifying which of year, month or day appears third (in the first bytes) in value
spcifies the expected separator character bewteen year, month and day (for example '-')
This function is similar to gda_parse_iso8601_timestamp() (with first
being G_DATE_YEAR,
second
being G_DATE_MONTH,
third
being G_DATE_DAY
and sep
being '-') but allows one to specify the expected date format.
a pointer to a #GdaTimeStamp structure which will be filled
a string to be parsed
a #GDateDMY specifying which of year, month or day appears first (in the first bytes) in value
a #GDateDMY specifying which of year, month or day appears second (in the first bytes) in value
a #GDateDMY specifying which of year, month or day appears third (in the first bytes) in value
spcifies the expected separator character bewteen year, month and day (for example '-')
Extracts date parts from value,
and sets gdate'
s contents
Accepted date format is "YYYY-MM-DD" (more or less than 4 digits for years and less than 2 digits for month and day are accepted). Years must be in the 1-65535 range, a limitation imposed by #GDate.
Modifies stmt
to take into account any parameter which might be %NULL: if stmt
contains the
equivalent of "xxx = <parameter definition>" and if that parameter is in params
and
its value is of type GDA_TYPE_NUL, then that part is replaced with "xxx IS NULL". It also
handles the "xxx IS NOT NULL" transformation.
For example the following SELECT:
if out_stmt
is not %NULL, then it will contain:
stmt
were required and no erro occurred (the function returns %FALSE)
This function is used by provider's implementations to make sure one can use parameters with NULL values in statements without having to rewrite statements, as database usually don't consider that "xxx = NULL" is the same as "xxx IS NULL" when using parameters.
a #GdaStatement
a #GdaSet to be used as parameters when executing stmt
a place to store the new #GdaStatement, or %NULL
Decodes string
using the RFC 1738 recommendations: the
;/?:
=`&
string
should respect the RFC 1738 encoding. If this is not the case (for example if there
is a "%2z" because 2z is not an hexadecimal value), then the part with the problem
is not decoded, and the function returns FALSE.
string
is decoded in place, no new string gets created.
a string to decode
Encodes string
using the RFC 1738 recommendations: the
;/?:
=`&
a string to encode
Use this function for any SQL identifier to make sure that:
cnc
(if cnc
is %NULL, then some default SQL quoting rules will be applied,
similar to PostgreSQL's way) if for_meta_store
is %FALSE;
cnc
is for_meta_store
is %TRUE.
The force_quotes
allow some control of how to interpret id:
if %FALSE, then id
will be left
unchanged most of the time (except for example if it's a reserved keyword), otherwise
if force_quotes
is %TRUE, then the returned string will most probably have quotes around it
to request that the database keep the case sensitiveness (but again, this may vary depending
on the database being accessed through cnc)
.
For example, the following table gives the result of this function depending on the arguments
when cnc
is %NULL (and prov
is also %NULL):
Here are a few examples of when and how to use this function:
Note that id
must not be a composed SQL identifier (such as "mytable.mycolumn" which should be
treated as the "mytable" and "mycolumn" SQL identifiers). If unsure, use gda_sql_identifier_split().
Also note that if cnc
is %NULL, then it's possible to pass an non %NULL prov
to have a result specific
to prov
.
For more information, see the SQL identifiers and abstraction and
SQL identifiers in meta data sections.an SQL identifier
a #GdaConnection object, or %NULL
a #GdaServerProvider object, or %NULL for_meta_store
set to %TRUE if the returned string will be used in a #GdaMetaStore
set to %TRUE to force the returned string to be quoted
Splits id
into an array of it sub parts. id'
s format has to be "<part>[.<part>[...]]" where
each part is either a text surrounded by double quotes which can contain upper and lower cases or
an SQL identifier in lower case.
For example the string will result in the array:
an SQL identifier
Performs the reverse of gda_binary_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).
I str
is %NULL, then an empty (i.e. where the data
part is %NULL) #GdaBinary is created and returned.
a string to convert, or %NULL
The "encoding" consists in replacing non alphanumeric character with the string "__gdaXX" where XX is the hex. representation of the non alphanumeric char.
the text to convert
Dump the data in a #GdaDataModel into a xmlNodePtr (as used in libxml).
Warning: this function uses a #GdaDataModelIter iterator, and if model
does not offer a random access
(check using gda_data_model_get_access_flags()), the iterator will be the same as normally used
to access data in model
previously to calling this method, and this iterator will be moved (point to
another row).
a #GdaDataModel
the parent XML node
an array containing which columns of model
will be exported, or %NULL for all columns
an array containing which rows of model
will be exported, or %NULL for all rows
set to %TRUE to add column ID information
Finds the description of a field into Metadata from a #GdaDataModel.
a #GdaDataSelect data model
field name
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:
value1
and value2
are both GDA_TYPE_NULL values then the returned value is 0value1
is a GDA_TYPE_NULL value and value2
is of another type then the returned value is -1value1
is of another type and value2
is a GDA_TYPE_NULL value then the returned value is 1value1
and value2
must be of the same type and their values are compared
a #GValue to compare (not %NULL)
the other #GValue to be compared to value1
(not %NULL)
Tells if two values are equal or not, by comparing memory representations. Unlike gda_value_compare(), the returned value is boolean, and gives no idea about ordering.
The two values must be of the same type, with the exception that a value of any type can be
compared to a GDA_TYPE_NULL value, specifically:
value1
and value2
are both GDA_TYPE_NULL values then the returned value is 0value1
is a GDA_TYPE_NULL value and value2
is of another type then the returned value is 1value1
is of another type and value2
is a GDA_TYPE_NULL value then the returned value is 1value1
and value2
must be of the same type and their values are compared
a #GValue to compare.
the other #GValue to be compared to value1
.
Converts a GValue to its string representation which is a human readable value. Note that the returned string does not take into account the current locale of the user (on the contrary to the #GdaDataHandler objects). Using this function should be limited to debugging and values serialization purposes.
Output is in the "C" locale for numbers, and dates are converted in a YYYY-MM-DD format.
a #GValue.
The corresponding attribute specifies if the object it refers to is auto incremented (value has a G_TYPE_BOOLEAN type).