Functions¶
Details¶
- Gda.alphanum_to_text(text)¶
 - Parameters:
 text (
str) – a string- Returns:
 text if conversion succeeded or
Noneif an error occurred- Return type:
 
Does the opposite of
Gda.text_to_alphanum(), in the same string
- Gda.binary_copy(boxed)¶
 - Parameters:
 - Returns:
 a newly allocated
Gda.Binarywhich contains a copy of information in boxed.Free-function:
Gda.Binary.free- Return type:
 
Creates a new
Gda.Binarystructure from an existing one.
- Gda.binary_free(boxed)¶
 - Parameters:
 boxed (
objectorNone) –Gda.Binaryto free.
Deallocates all memory associated to the given
Gda.Binary.
- Gda.blob_copy(boxed)¶
 - Parameters:
 - Returns:
 a newly allocated
Gda.Blobwhich contains a copy of information in boxed.Free-function:
Gda.Blob.free- Return type:
 
Creates a new
Gda.Blobstructure from an existing one.
- Gda.completion_list_get(cnc, sql, start, end)¶
 - Parameters:
 cnc (
Gda.Connection) – aGda.Connectionobjectsql (
str) – a partial SQL statement which is the context of the completion proposalstart (
int) – starting position within sql of the “token” to complete (starts at 0)end (
int) – ending position within sql of the “token” to complete
- Returns:
 a new array of strings, or
None(useGLib.strfreev() to free the returned array)- Return type:
 
Creates an array of strings (terminated by a
None) corresponding to possible completions. If no completion is available, then the returned array contains just oneNoneentry, and if it was not possible to try to compute a completions list, thenNoneis returned.
- Gda.compute_dml_statements(cnc, select_stmt, require_pk, insert_stmt, update_stmt, delete_stmt)¶
 - Parameters:
 cnc (
Gda.Connection) – aGda.Connectionselect_stmt (
Gda.Statement) – a SELECTGda.Statement(compound statements not handled)require_pk (
bool) –Trueif the created statement have to use a primary keyinsert_stmt (
Gda.StatementorNone) – a place to store the created INSERT statement, orNoneupdate_stmt (
Gda.StatementorNone) – a place to store the created UPDATE statement, orNonedelete_stmt (
Gda.StatementorNone) – a place to store the created DELETE statement, orNone
- Raises:
 - Returns:
 Trueif no error occurred- Return type:
 
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
None.
- Gda.data_handler_get_default(for_type)¶
 - Parameters:
 for_type (
GObject.GType) – aGObject.GTypetype- Returns:
 a
Gda.DataHandlerwhich must not be modified or destroyed.- Return type:
 
Obtain a pointer to a
Gda.DataHandlerwhich can manageGObject.Valuevalues 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
Noneif there is no default data handler available for the for_type data typeNew in version 4.2.3.
- Gda.default_escape_string(string)¶
 - 
Escapes string to make it understandable by a DBMS. The escape method is very common and replaces any occurrence of “’” with “’’” and “\” with “\\”
 
- Gda.default_unescape_string(string)¶
 - Parameters:
 string (
str) – string to unescape- Returns:
 a new unescaped string, or
Nonein an error was found in string- Return type:
 
Do the reverse of
Gda.default_escape_string(): transforms any “’’” into “’”, any “\\” into “\” and any “\’” into “’”.
- Gda.dsn_split(string, out_dsn, out_username, out_password)¶
 - Parameters:
 string (
str) – a string in the “[<username>[:<password>]@]<DSN>” formout_dsn (
str) – a place to store the new string containing the <DSN> partout_username (
str) – a place to store the new string containing the <username> partout_password (
str) – a place to store the new string containing the <password> part
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
Nonedepending on string's format.
- Gda.g_type_from_string(str)¶
 - Parameters:
 str (
str) – the name of aGObject.GType, as returned byGda.g_type_to_string().- Returns:
 the
GObject.GTyperepresented by the given str, orGObject.TYPE_INVALIDif not found- Return type:
 
Converts a named type to ts
GObject.GTypetype (also see theGda.g_type_to_string() function).This function is a wrapper around the
GObject.type_from_name() function, but also recognizes some type synonyms such as:“int” for
GObject.TYPE_INT“uint” for
GObject.TYPE_UINT“int64” for
GObject.TYPE_INT64“uint64” for
GObject.TYPE_UINT64“
str" forGObject.TYPE_CHAR“uchar” for
GObject.TYPE_UCHAR“short” for GDA_TYPE_SHORT
“ushort” for GDA_TYPE_USHORT
“string” for
GObject.TYPE_STRING“date” for G_TYPE_DATE
“time” for GDA_TYPE_TIME
“timestamp” for GDA_TYPE_TIMESTAMP
“boolean” for
GObject.TYPE_BOOLEAN“blob” for GDA_TYPE_BLOB
“binary” for GDA_TYPE_BINARY
“null” for GDA_TYPE_NULL
- Gda.g_type_to_string(type)¶
 - Parameters:
 type (
GObject.GType) – Type to convert from.- Returns:
 the GDA’s string representing the given
GObject.GTypeor the name returned byGObject.type_name.- Return type:
 
Converts a
GObject.GTypeto its string representation (useGda.g_type_from_string() for the operation in the other direction).This function wraps
GObject.type_name() but for common types it provides an easier to understand and remember name. For Example theGObject.TYPE_STRINGis converted to “string” whereasGObject.type_name() converts it to “gchararray”.
- Gda.get_application_exec_path(app_name)¶
 - Parameters:
 app_name (
str) – the name of the application to find- Returns:
 the path as a new string, or
Noneif the application cannot be found- Return type:
 
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.
- Gda.identifier_equal(id1, id2)¶
 - Parameters:
 - Returns:
 Trueif id1 and id2 are equal.- Return type:
 
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
GLib.EqualFunc.
- Gda.identifier_hash(id)¶
 - 
computes a hash string from id, to be used in hash tables as a
GLib.HashFunc 
- Gda.init()¶
 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.
- Gda.locale_changed()¶
 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 callingGda.init().Failing to call this function after having changed the current locale may result in Libgda reverting to the previous set locale.
New in version 4.2.3.
- Gda.log_disable()¶
 Disables GDA logs.
- Gda.log_enable()¶
 Enables GDA logs.
- Gda.mutex_free(mutex)¶
 - Parameters:
 mutex (
GLib.RecMutex) –
- Gda.mutex_lock(mutex)¶
 - Parameters:
 mutex (
GLib.RecMutex) –
- Gda.mutex_trylock(mutex)¶
 - Parameters:
 mutex (
GLib.RecMutex) –- Return type:
 
- Gda.mutex_unlock(mutex)¶
 - Parameters:
 mutex (
GLib.RecMutex) –
- Gda.parse_formatted_date(gdate, value, first, second, third, sep)¶
 - Parameters:
 gdate (
GLib.Date) – a pointer to aGLib.Datestructure which will be filledvalue (
str) – a string to be parsedfirst (
GLib.DateDMY) – aGLib.DateDMYspecifying which of year, month or day appears first (in the first bytes) in valuesecond (
GLib.DateDMY) – aGLib.DateDMYspecifying which of year, month or day appears second (in the first bytes) in valuethird (
GLib.DateDMY) – aGLib.DateDMYspecifying which of year, month or day appears third (in the first bytes) in valuesep (
int) – spcifies the expected separator character bewteen year, month and day (for example ‘-‘)
- Returns:
 Trueif value has been sucessfuly parsed as a valid date (seeGLib.Date.valid()).- Return type:
 
This function is similar to
Gda.parse_iso8601_date() (with first beingGLib.DateDMY.YEAR, second beingGLib.DateDMY.MONTH, third beingGLib.DateDMY.DAYand sep being ‘-’) but allows one to specify the expected date format.New in version 5.2.
- Gda.parse_formatted_time(timegda, value, sep)¶
 - Parameters:
 - Returns:
 Trueif no error occurred- Return type:
 
New in version 5.2.
- Gda.parse_formatted_timestamp(timestamp, value, first, second, third, sep)¶
 - Parameters:
 timestamp (
Gda.Timestamp) – a pointer to a #GdaTimeStamp structure which will be filledvalue (
str) – a string to be parsedfirst (
GLib.DateDMY) – aGLib.DateDMYspecifying which of year, month or day appears first (in the first bytes) in valuesecond (
GLib.DateDMY) – aGLib.DateDMYspecifying which of year, month or day appears second (in the first bytes) in valuethird (
GLib.DateDMY) – aGLib.DateDMYspecifying which of year, month or day appears third (in the first bytes) in valuesep (
int) – spcifies the expected separator character bewteen year, month and day (for example ‘-‘)
- Returns:
 Trueif value has been sucessfuly parsed as a valid date (seeGLib.Date.valid()).- Return type:
 
This function is similar to
Gda.parse_iso8601_timestamp() (with first beingGLib.DateDMY.YEAR, second beingGLib.DateDMY.MONTH, third beingGLib.DateDMY.DAYand sep being ‘-’) but allows one to specify the expected date format.New in version 5.2.
- Gda.parse_iso8601_date(gdate, value)¶
 - Parameters:
 - Returns:
 Trueif value has been sucessfuly parsed as a valid date (seeGLib.Date.valid()).- Return type:
 
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
GLib.Date.
- Gda.parse_iso8601_time(timegda, value)¶
 - Parameters:
 - Returns:
 Trueif no error occurred- Return type:
 
Extracts time parts from value, and sets timegda's contents
Accepted date format is “HH:MM:SS’.ms [TZ]’” where TZ is +hour or -hour
- Gda.parse_iso8601_timestamp(timestamp, value)¶
 - Parameters:
 timestamp (
Gda.Timestamp) – a pointer to a #GdaTimeStamp structure which will be filledvalue (
str) – a string
- Returns:
 Trueif value has been sucessfuly parsed as a valid timestamp (seeGLib.Date.valid())- Return type:
 
Extracts date and time parts from value, and sets timestamp's contents
Accepted date format is “YYYY-MM-DD HH:MM:SS’.ms [TZ]’” where TZ is +hour or -hour
- Gda.rewrite_statement_for_null_parameters(stmt, params, out_stmt)¶
 - Parameters:
 stmt (
Gda.Statement) – aGda.Statementparams (
Gda.Set) – aGda.Setto be used as parameters when executing stmtout_stmt (
Gda.StatementorNone) – a place to store the newGda.Statement, orNone
- Raises:
 - Returns:
 Trueif stmt needs to be transformed to handleNoneparameters, andFalseotherwise- Return type:
 
Modifies stmt to take into account any parameter which might be
None: 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 ISNone". It also handles the “xxx IS NOTNone" transformation.For example the following SELECT:
SELECT * FROM data WHERE id = ##id::int::null AND name = ##name::stringin case the “id” parameter is set toNone, is converted to:SELECT * FROM data WHERE id IS NULL AND name = ##name::stringif out_stmt is notNone, then it will contain:the modified statement if some modifications were required and no error occured (the function returns
True)Noneif no modification to stmt were required and no erro occurred (the function returnsFalse)
This function is used by provider’s implementations to make sure one can use parameters with
Nonevalues in statements without having to rewrite statements, as database usually don’t consider that “xxx =None" is the same as “xxx ISNone" when using parameters.New in version 4.2.9.
- Gda.rfc1738_decode(string)¶
 - 
Decodes string using the RFC 1738 recommendations: the
<>”#%{}|\^~[]’`;/?:@=& and space characters are replaced by “%%ab” where ab is the hexadecimal number corresponding to the character. 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.
 
- Gda.rfc1738_encode(string)¶
 - 
Encodes string using the RFC 1738 recommendations: the
<>”#%{}|\^~[]’`;/?:@=& and space characters are replaced by “%%ab” where ab is the hexadecimal number corresponding to the character.
 
- Gda.select_alter_select_for_empty(stmt)¶
 - Parameters:
 stmt (
Gda.Statement) – a SELECTGda.Statement- Raises:
 - Returns:
 a new
Gda.Statement- Return type:
 
Creates a new
Gda.Statement, selecting the same data as stmt, but which always returns an empty (no row) data model. This is use dy database providers’ implementations.
- Gda.sql_identifier_quote(id, cnc, prov, meta_store_convention, force_quotes)¶
 - Parameters:
 id (
str) – an SQL identifiercnc (
Gda.ConnectionorNone) – aGda.Connectionobject, orNoneprov (
Gda.ServerProviderorNone) – aGda.ServerProviderobject, orNonefor_meta_store set toTrueif the returned string will be used in aGda.MetaStoremeta_store_convention (
bool) –force_quotes (
bool) – set toTrueto force the returned string to be quoted
- Returns:
 the representation of id ready to be used in SQL statement, as a new string, or
Noneif id is in a wrong format- Return type:
 
Use this function for any SQL identifier to make sure that: <itemizedlist> <listitem> <para>it is correctly formatted to be used with cnc (if cnc is
None, then some default SQL quoting rules will be applied, similar to PostgreSQL’s way) if for_meta_store isFalse; </para> </listitem> <listitem> <para>it is correctly formatted to be used with theGda.MetaStore's object associated to cnc is for_meta_store isTrue. </para> </listitem> </itemizedlist>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 isTrue, 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
None(and prov is alsoNone): <table frame=”all”> <tgroup cols=”6” colsep=”1” rowsep=”1” align=”justify”> <thead> <row> <entry>id</entry> <entry>for_meta_store=:obj:False, force_quotes=:obj:False</entry> <entry>for_meta_store=:obj:True, force_quotes=:obj:False</entry> <entry>for_meta_store=:obj:False, force_quotes=:obj:True</entry> <entry>for_meta_store=:obj:True, force_quotes=:obj:True</entry> <entry>remark</entry> </row> </thead> <tbody> <row> <entry>”double word”</entry> <entry>”double word”</entry> <entry>”double word”</entry> <entry>”double word”</entry> <entry>”double word”</entry> <entry>non allowed character in SQL identifier</entry> </row> <row> <entry>”CapitalTest”</entry> <entry>”CapitalTest”</entry> <entry>”CapitalTest”</entry> <entry>”CapitalTest”</entry> <entry>”CapitalTest”</entry> <entry>Mixed case SQL identifier, already quoted</entry> </row> <row> <entry>CapitalTest</entry> <entry>CapitalTest</entry> <entry>capitaltest</entry> <entry>”CapitalTest”</entry> <entry>”CapitalTest”</entry> <entry>Mixed case SQL identifier, non quoted</entry> </row> <row> <entry>”mytable”</entry> <entry>”mytable”</entry> <entry>mytable</entry> <entry>”mytable”</entry> <entry>mytable</entry> <entry>All lowser case, quoted</entry> </row> <row> <entry>mytable</entry> <entry>mytable</entry> <entry>mytable</entry> <entry>”mytable”</entry> <entry>mytable</entry> <entry>All lowser case</entry> </row> <row> <entry>MYTABLE</entry> <entry>MYTABLE</entry> <entry>mytable</entry> <entry>”MYTABLE”</entry> <entry>”MYTABLE”</entry> <entry>All upper case</entry> </row> <row> <entry>”MYTABLE”</entry> <entry>”MYTABLE”</entry> <entry>”MYTABLE”</entry> <entry>”MYTABLE”</entry> <entry>”MYTABLE”</entry> <entry>All upper case, quoted</entry> </row> <row> <entry>desc</entry> <entry>”desc”</entry> <entry>”desc”</entry> <entry>”desc”</entry> <entry>”desc”</entry> <entry>SQL reserved keyword</entry> </row> <row> <entry>5ive</entry> <entry>”5ive”</entry> <entry>”5ive”</entry> <entry>”5ive”</entry> <entry>”5ive”</entry> <entry>SQL identifier starting with a digit</entry> </row> </tbody> </tgroup> </table>Here are a few examples of when and how to use this function: <itemizedlist> <listitem> <para> When creating a table, the user has entered the table name, this function can be used to create a valid SQL identifier from the user provided table name: <programlisting>
str*user_sqlid=…str*valid_sqlid =Gda.sql_identifier_quote(user_sqlid, cnc,None,False,False);str*sql = g_strdup_printf (“CREATE TABLE %s …”, valid_sqlid);GLib.free(valid_sqlid); </programlisting> Note that this is an illustration and creating a table should be sone using aGda.ServerOperationobject. </para> </listitem> <listitem> <para> When updating the meta data associated to a table which has been created with the code above: <programlisting>GObject.Valuetable_name_value = { 0 };strcolumn_names[] = { (str)”table_name” };GObject.Valuecolumn_values[] = { &table_name_value };Gda.MetaContextmcontext = { (str)”_tables”, 1, column_names, column_values };GObject.Value.init(&table_name_value,GObject.TYPE_STRING);GObject.Value.take_string(&table_name_value,Gda.sql_identifier_quote(user_sqlid, cnc,None,True,False);Gda.Connection.update_meta_store(cnc, &mcontext,None);GObject.Value.reset(&table_name_value); </programlisting> </para> </listitem> <listitem> <para> When using aGda.MetaStructobject to fetch information about a table (which has been created with the code above): <programlisting>GObject.Valuetable_name_value = { 0 };GObject.Value.init(&table_name_value,GObject.TYPE_STRING);GObject.Value.take_string(&table_name_value,Gda.sql_identifier_quote(user_sqlid, cnc,None,True,False);Gda.MetaDbObject*dbo; dbo =Gda.MetaStruct.complement(mstruct,Gda.MetaDbObjectType.TABLE,None,None, &table_name_value,None);GObject.Value.reset(&table_name_value); </programlisting> </para> </listitem> </itemizedlist>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
None, then it’s possible to pass an nonNoneprov to have a result specific to prov.For more information, see the <link linkend=”gen:sql_identifiers”>SQL identifiers and abstraction</link> and <link linkend=”information_schema:sql_identifiers”>SQL identifiers in meta data</link> sections.
New in version 4.0.3.
- Gda.sql_identifier_split(id)¶
 - Parameters:
 id (
str) – an SQL identifier- Returns:
 a new
None-terminated array of strings, orNone(useGLib.strfreev() to free the returned array)- Return type:
 
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 <![CDATA[“test.\”ATable\””]]> string will result in the array: {“test”, “\”ATable\””,
None}
- Gda.sql_operation_operator_to_string(op)¶
 - Parameters:
 op (
Gda.SqlOperatorType) –- Return type:
 
- Gda.sql_select_join_type_to_string(type)¶
 - Parameters:
 type (
Gda.SqlSelectJoinType) –- Return type:
 
- Gda.string_to_binary(str)¶
 - Parameters:
 - Returns:
 a new
Gda.Binaryif no error were found in str, orNoneotherwise- Return type:
 
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
None, then an empty (i.e. where the data part isNone)Gda.Binaryis created and returned.
- Gda.string_to_blob(str)¶
 - Parameters:
 str (
str) – a string to convert- Returns:
 a new #gdaBlob if no error were found in str, or
Noneotherwise- Return type:
 
Performs the reverse of
Gda.Blob.to_string().
- Gda.text_to_alphanum(text)¶
 - 
The “encoding” consists in replacing non alphanumeric character with the string “__gdaXX” where XX is the hex. representation of the non alphanumeric
str. 
- Gda.utility_check_data_model(model, types)¶
 - Parameters:
 model (
Gda.DataModel) – aGda.DataModelobjecttypes ([
GObject.GType]) – array with nbcols length of typeGObject.GTypeor null (if any data type is accepted)
- Returns:
 Trueif the data model’s columns match the provided data types and number- Return type:
 
Check the column types of a
Gda.DataModel.New in version 4.2.6.
- Gda.utility_data_model_dump_data_to_xml(model, parent, cols, rows, use_col_ids)¶
 - Parameters:
 model (
Gda.DataModel) – aGda.DataModelparent (
libxml2.NodePtr) – the parent XML nodecols ([
int] orNone) – an array containing which columns of model will be exported, orNonefor all columnsrows ([
int] orNone) – an array containing which rows of model will be exported, orNonefor all rowsuse_col_ids (
bool) – set toTrueto add column ID information
- Returns:
 Trueif no error occurred- Return type:
 
Dump the data in a
Gda.DataModelinto alibxml2.NodePtr(as used in libxml).Warning: this function uses a
Gda.DataModelIteriterator, and if model does not offer a random access (check usingGda.DataModel.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).
- Gda.utility_data_model_find_column_description(model, field_name)¶
 - Parameters:
 model (
Gda.DataSelect) – aGda.DataSelectdata modelfield_name (
str) – field name
- Returns:
 The field’s description, or
Noneif description is not set- Return type:
 
Finds the description of a field into Metadata from a
Gda.DataModel.
- Gda.utility_holder_load_attributes(holder, node, sources)¶
 - Parameters:
 holder (
Gda.Holder) – aGda.Holdernode (
libxml2.NodePtr) – anlibxml2.NodePtrwith a <parameter> tagsources ([
Gda.DataModel]) – a list ofGda.DataModel
- Raises:
 - Returns:
 Trueif no error occurred- Return type:
 
Note: this method may set the “source” custom string property
- Gda.value_compare(value1, value2)¶
 - Parameters:
 value1 (
GObject.Value) – aGObject.Valueto compare (notNone)value2 (
GObject.Value) – the otherGObject.Valueto be compared to value1 (notNone)
- Returns:
 if both values have the same type, returns 0 if both contain the same value, an integer less than 0 if value1 is less than value2 or an integer greater than 0 if value1 is greater than value2.
- Return type:
 
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:
if value1 and value2 are both GDA_TYPE_NULL values then the returned value is 0
if value1 is a GDA_TYPE_NULL value and value2 is of another type then the returned value is -1
if value1 is of another type and value2 is a GDA_TYPE_NULL value then the returned value is 1
in all other cases, value1 and value2 must be of the same type and their values are compared
- Gda.value_differ(value1, value2)¶
 - Parameters:
 value1 (
GObject.Value) – aGObject.Valueto compare.value2 (
GObject.Value) – the otherGObject.Valueto be compared to value1.
- Returns:
 a non 0 value if value1 and value2 differ, and 0 if they are equal
- Return type:
 
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:
if value1 and value2 are both GDA_TYPE_NULL values then the returned value is 0
if value1 is a GDA_TYPE_NULL value and value2 is of another type then the returned value is 1
if value1 is of another type and value2 is a GDA_TYPE_NULL value then the returned value is 1
in all other cases, value1 and value2 must be of the same type and their values are compared
- Gda.value_stringify(value)¶
 - Parameters:
 value (
GObject.Value) – aGObject.Value.- Returns:
 a new string, or
Noneif the conversion cannot be done. Free the value with aGLib.free() when you’ve finished using it.- Return type:
 
Converts a
GObject.Valueto 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 theGda.DataHandlerobjects). 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.