gda-server-provider-extra

gda-server-provider-extra

Types and Values

Description

Functions

gda_server_provider_internal_get_parser ()

GdaSqlParser *
gda_server_provider_internal_get_parser
                               (GdaServerProvider *prov);

This is a factory method to get a unique instance of a GdaSqlParser object for each GdaServerProvider object Don't unref it.

Parameters

prov

a GdaServerProvider

 

Returns

a GdaSqlParser.

[transfer none]


gda_server_provider_perform_operation_default ()

gboolean
gda_server_provider_perform_operation_default
                               (GdaServerProvider *provider,
                                GdaConnection *cnc,
                                GdaServerOperation *op,
                                GError **error);

Performs the operation described by op , using the SQL from the rendering of the operation

Parameters

provider

a GdaServerProvider object

 

cnc

a GdaConnection object which will be used to perform an action, or NULL.

[allow-none]

op

a GdaServerOperation object

 

error

a place to store an error, or NULL

 

Returns

TRUE if no error occurred


gda_server_provider_handler_use_default ()

GdaDataHandler *
gda_server_provider_handler_use_default
                               (GdaServerProvider *provider,
                                GType type);

Reserved to database provider's implementations. This method defines a default data handler for provider , and returns that GdaDataHandler.

Parameters

provider

a server provider

 

type

a GType

 

Returns

a GdaDataHandler, or NULL.

[transfer none]

Since: 5.2


gda_select_alter_select_for_empty ()

GdaStatement *
gda_select_alter_select_for_empty (GdaStatement *stmt,
                                   GError **error);

Creates a new GdaStatement, selecting the same data as stmt , but which always returns an empty (no row) data model. This is use dy database providers' implementations.

Parameters

stmt

a SELECT GdaStatement

 

error

a place to store errors, or NULL.

[allow-none]

Returns

a new GdaStatement.

[transfer full]


gda_server_provider_handler_find ()

GdaDataHandler *
gda_server_provider_handler_find (GdaServerProvider *prov,
                                  GdaConnection *cnc,
                                  GType g_type,
                                  const gchar *dbms_type);

Reserved to database provider's implementations: get the GdaDataHandler associated to prov for connection cnc . You probably want to use gda_server_provider_get_data_handler_g_type().

Parameters

prov

a GdaServerProvider

 

cnc

a GdaConnection.

[allow-none]

g_type

a GType

 

dbms_type

a database type.

[allow-none]

Returns

the requested GdaDataHandler, or NULL if none found.

[transfer none]


gda_server_provider_handler_declare ()

void
gda_server_provider_handler_declare (GdaServerProvider *prov,
                                     GdaDataHandler *dh,
                                     GdaConnection *cnc,
                                     GType g_type,
                                     const gchar *dbms_type);

gda_server_provider_find_file ()

gchar *
gda_server_provider_find_file (GdaServerProvider *prov,
                               const gchar *inst_dir,
                               const gchar *filename);

Finds the location of a filename . This function should only be used by database provider's implementations

Parameters

prov

a GdaServerProvider

 

inst_dir

directory where prov is installed

 

filename

name of the file to find

 

Returns

the complete path to filename , or NULL if not found.

[transfer full]


gda_server_provider_load_file_contents ()

gchar *
gda_server_provider_load_file_contents
                               (const gchar *inst_dir,
                                const gchar *data_dir,
                                const gchar *filename);

Loads and returns the contents of filename , which is searched in several places This function should only be used by database provider's implementations

Parameters

inst_dir

directory where the database provider has been installed

 

data_dir

DATA directory to look for ($prefix/share)

 

filename

name of the file to load

 

Returns

a new string containing filename 's contents, or NULL if not found or if an error occurred.

[transfer full]


gda_server_provider_load_resource_contents ()

gchar *
gda_server_provider_load_resource_contents
                               (const gchar *prov_name,
                                const gchar *resource);

Loads and returns the contents of the specified resource. This function should only be used by database provider's implementations

Parameters

prov_name

the provider's name

 

resource

the name of the resource to load

 

Returns

a new string containing the resource's contents, or NULL if not found or if an error occurred.

[transfer full]

Since: 6.0

Types and Values

GdaServerProviderHandlerInfo

typedef struct {
	GdaConnection *cnc;
	GType          g_type;
	gchar         *dbms_type;
} GdaServerProviderHandlerInfo;