/usr/share/gtk-doc/html/libgda-4.0/libgda-provider-class.html is in libgda-4.0-doc 4.2.8-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Virtual methods for providers</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GNOME Data Access 4 manual">
<link rel="up" href="part_providers.html" title="Part VII. Databases providers for developers">
<link rel="prev" href="libgda-4.0-Misc-API.html" title="Misc API">
<link rel="next" href="ch41s02.html" title="Multi threaded environment">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="libgda-4.0-Misc-API.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="part_providers.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GNOME Data Access 4 manual</th>
<td><a accesskey="n" href="ch41s02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="libgda-provider-class"></a>Virtual methods for providers</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="sect1"><a href="libgda-provider-class.html#id1009959">Synchronous / asynchronous mode</a></span></dt>
<dt><span class="sect1"><a href="ch41s02.html">Multi threaded environment</a></span></dt>
<dt><span class="sect1"><a href="ch41s03.html">Methods - provider's information</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch41s03.html#prov-get-name">get_name() - mandatory</a></span></dt>
<dt><span class="sect2"><a href="ch41s03.html#prov-get-version">get_version() - mandatory</a></span></dt>
<dt><span class="sect2"><a href="ch41s03.html#prov-get-server-version">get_server_version() - mandatory</a></span></dt>
<dt><span class="sect2"><a href="ch41s03.html#id1010178">supports_feature()</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch41s04.html">Methods - connection management</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch41s04.html#prov-open-connection">open_connection() - mandatory</a></span></dt>
<dt><span class="sect2"><a href="ch41s04.html#prov-close-connection">close_connection() - mandatory</a></span></dt>
<dt><span class="sect2"><a href="ch41s04.html#id1010272">get_database()</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch41s05.html">Methods - DDL queries</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch41s05.html#id1009823">supports_operation()</a></span></dt>
<dt><span class="sect2"><a href="ch41s05.html#id1009841">create_operation()</a></span></dt>
<dt><span class="sect2"><a href="ch41s05.html#id1009858">render_operation()</a></span></dt>
<dt><span class="sect2"><a href="ch41s05.html#id1010439">perform_operation()</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch41s06.html">Methods - transactions management</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch41s06.html#id1010467">begin_transaction()</a></span></dt>
<dt><span class="sect2"><a href="ch41s06.html#id1010477">commit_transaction()</a></span></dt>
<dt><span class="sect2"><a href="ch41s06.html#id1010488">rollback_transaction()</a></span></dt>
<dt><span class="sect2"><a href="ch41s06.html#id1010498">add_savepoint()</a></span></dt>
<dt><span class="sect2"><a href="ch41s06.html#id1010509">rollback_savepoint()</a></span></dt>
<dt><span class="sect2"><a href="ch41s06.html#id1010520">delete_savepoint()</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch41s07.html">Methods - DML queries</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch41s07.html#id1010575">create_parser()</a></span></dt>
<dt><span class="sect2"><a href="ch41s07.html#id1010593">statement_to_sql()</a></span></dt>
<dt><span class="sect2"><a href="ch41s07.html#id1010616">statement_prepare()</a></span></dt>
<dt><span class="sect2"><a href="ch41s07.html#id1010641">statement_execute() - mandatory</a></span></dt>
<dt><span class="sect2"><a href="ch41s07.html#id1010747">handle_async()</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch41s08.html">Methods - data representation</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch41s08.html#id1010794">get_data_handler()</a></span></dt>
<dt><span class="sect2"><a href="ch41s08.html#id1010838">get_def_dbms_type()</a></span></dt>
<dt><span class="sect2"><a href="ch41s08.html#id1010849">escape_string()</a></span></dt>
<dt><span class="sect2"><a href="ch41s08.html#id1010860">unescape_string()</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="prov-metadata.html">Methods - metadata</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="prov-metadata.html#id1011018">Important note about SQL identifiers</a></span></dt>
<dt><span class="sect2"><a href="prov-metadata.html#id1011114">Reserved SQL keywords</a></span></dt>
<dt><span class="sect2"><a href="prov-metadata.html#id1011172">_info()</a></span></dt>
<dt><span class="sect2"><a href="prov-metadata.html#id1011197">_btypes()</a></span></dt>
<dt><span class="sect2"><a href="prov-metadata.html#id1011221">schemata() and _schemata()</a></span></dt>
<dt><span class="sect2"><a href="prov-metadata.html#id1011248">tables_views() and _tables_views()</a></span></dt>
<dt><span class="sect2"><a href="prov-metadata.html#id1011282">columns() and _columns()</a></span></dt>
<dt><span class="sect2"><a href="prov-metadata.html#id1011308">constraints_tab() and _constraints_tab()</a></span></dt>
<dt><span class="sect2"><a href="prov-metadata.html#id1011336">constraints_ref() and _constraints_ref()</a></span></dt>
<dt><span class="sect2"><a href="prov-metadata.html#id1011372">key_columns() and _key_columns()</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="ch41s10.html">Methods - misc.</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="ch41s10.html#id1011418">cancel()</a></span></dt>
<dt><span class="sect2"><a href="ch41s10.html#id1011428">create_connection()</a></span></dt>
<dt><span class="sect2"><a href="ch41s10.html#id1011439">is_busy()</a></span></dt>
</dl></dd>
</dl></div>
<p>
Database providers usually (that is except for <span class="emphasis"><em>virtual</em></span> providers explained later) subclass
the <a class="link" href="GdaServerProvider.html" title="GdaServerProvider">GdaServerProvider</a> class and implement at least the mandatory
virtual methods.
</p>
<p>
Virtual providers are database providers when the database engine accessed does not support SQL (or
supports it poorly), such as Berkeley databases or MDB (or even LDAP). These provider's implementation's
design is to create <a class="link" href="GdaDataModel.html" title="GdaDataModel">GdaDataModel</a> data model objects and make
each of them appear as a named table once the connection is opened. For example the MDB provider creates
a read-only data model for each table in an MDB file and make it appear using the original table
name used in MS Access (the tables cannot be modified but it is possible to use all SQLite's SQL
to make SELECT queries).
</p>
<p>
Virtual providers inherit the <a class="link" href="GdaVproviderDataModel.html" title="GdaVproviderDataModel">GdaVproviderDataModel</a> class
and not the <a class="link" href="GdaServerProvider.html" title="GdaServerProvider">GdaServerProvider</a> as "normal" providers do,
and the number of virtual methods to implement is very limited: only the <a class="link" href="ch41s03.html#prov-get-name" title="get_name() - mandatory">get_name()</a>,
<a class="link" href="ch41s03.html#prov-get-version" title="get_version() - mandatory">get_version()</a>, <a class="link" href="ch41s03.html#prov-get-server-version" title="get_server_version() - mandatory">get_server_version()</a>,
<a class="link" href="ch41s04.html#prov-open-connection" title="open_connection() - mandatory">open_connection()</a> and get_database()
should be implemented, optionnally the <a class="link" href="ch41s04.html#prov-close-connection" title="close_connection() - mandatory">close_connection()</a> can
also be implemented.
</p>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="id1009959"></a>Synchronous / asynchronous mode</h2></div></div></div>
<p>
All the provider's commands are executed in a synchronous mode (the caller is blocked until the provider's
method terminates). However some virtual methods have the a <em class="parameter"><code>task_id</code></em> parameter,
an <em class="parameter"><code>async_cb</code></em> or <em class="parameter"><code>exec_cb</code></em> callback function pointer and
a <em class="parameter"><code>cb_data</code></em> parameter which can be set when an asynchronous mode
is required; asynchronous mode is requested if and only if the <em class="parameter"><code>async_cb</code></em> or
<em class="parameter"><code>exec_cb</code></em> parmeter is not NULL.
</p>
<p>
When an asynchronous mode is requested, the method should return TRUE if it returns a boolean or NULL if it returns a
pointer and set a task identifier
into the <em class="parameter"><code>task_id</code></em> parameter if not NULL. The task identifier is passed again when
the <em class="parameter"><code>async_cb</code></em> or <em class="parameter"><code>exec_cb</code></em> callback functions are called by the
provider when the execution is finished.
</p>
<p>
When the provider's method terminates, it then should call the function passed as <em class="parameter"><code>async_cb</code></em>
with the <em class="parameter"><code>cb_data</code></em> as last parameters.
</p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.17</div>
</body>
</html>
|