gda.data_handler_mixin
Module for [DataHandler] interface mixin
Templates 2
Checks wether the GdaDataHandler is able to handle the gda type given as argument.
Parameters
type | a #GType |
Returns
Get a short description of the GdaDataHandler
Returns
Creates a new GValue which holds a sane initial value to be used if no value is specifically provided. For example for a simple string, this would return a new value containing the "" string.
Parameters
type | a #GType |
Returns
Creates a new string which is an SQL representation of the given value, the returned string can be used directly in an SQL statement. For example if value is a G_TYPE_STRING, then the returned string will be correctly quoted. Note however that it is a better practice to use variables in statements instead of value literals, see the <link linkend="GdaSqlParser.description">GdaSqlParser</link> for more information.
If the value is NULL or is of type GDA_TYPE_NULL, or is a G_TYPE_STRING and [gobject.value.Value.getString] returns null, the returned string is "NULL".
Parameters
value | the value to be converted to a string, or null |
Returns
Creates a new string which is a "user friendly" representation of the given value (in the user's locale, specially for the dates). If the value is NULL or is of type GDA_TYPE_NULL, the returned string is a copy of "" (empty string).
Note
Parameters
value | the value to be converted to a string, or null |
Returns
Creates a new GValue which represents the SQL value given as argument. This is the opposite of the function [gda.data_handler.DataHandler.getSqlFromValue]. The type argument is used to determine the real data type requested for the returned value.
If the sql string is null, then the returned GValue is of type GDA_TYPE_NULL; if the sql string does not correspond to a valid SQL string for the requested type, then the null is returned.
Parameters
sql | an SQL string, or null |
type | a GType |
Returns
Creates a new GValue which represents the str value given as argument. This is the opposite of the function [gda.data_handler.DataHandler.getStrFromValue]. The type argument is used to determine the real data type requested for the returned value.
If the str string is null, then the returned GValue is of type GDA_TYPE_NULL; if the str string does not correspond to a valid string for the requested type, then null is returned.
Note
Parameters
str | a string or null |
type | a GType |