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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>For SQLite: GNOME Data Access 5 manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GNOME Data Access 5 manual">
<link rel="up" href="provider-notes.html" title="Provider's notes">
<link rel="prev" href="provider-notes.html" title="Provider's notes">
<link rel="next" href="provider_notes_sqlcipher.html" title="For SQLCipher">
<meta name="generator" content="GTK-Doc V1.32 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="provider-notes.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="provider-notes.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="provider_notes_sqlcipher.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="provider_notes_sqlite"></a>For SQLite</h2></div></div></div>
<p>
The following arguments are used to connect to an SQLite database:
</p>
<div class="table">
<a name="id-1.2.11.5.2.1"></a><p class="title"><b>Table 2. </b></p>
<div class="table-contents"><table class="table" border="1">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th align="justify">Argument name</th>
<th align="justify">Description</th>
<th align="justify">Required</th>
</tr></thead>
<tbody>
<tr>
<td align="justify">DB_NAME</td>
<td align="justify">Name of the database. This should be the name of the database file without
the ".db" extension. However when opening a database, if a file named after the DB_NAME
value exists then it is used (so beware, for example if DB_NAME is set to "mydb" and a file
named "mydb" exists but is not an SQLite database, then an error will occur).
Using the ":memory:" database name will result in a database residing purely in memory, the database
ceases to exist as soon as the database connection is closed (every memory database is distinct from
every other); refer to
<a class="ulink" href="http://www.sqlite.org/inmemorydb.html" target="_top">SQLite's in memory databases</a> for more
information.
</td>
<td align="justify">Yes</td>
</tr>
<tr>
<td align="justify">APPEND_DB_EXTENSION</td>
<td align="justify">Defines if the '.db' extension need to be appended to the name of the database. Defaults to TRUE if not
specified.</td>
<td align="justify">No</td>
</tr>
<tr>
<td align="justify">DB_DIR</td>
<td align="justify">The directory where the database file is; if not specified, the current working
directory is used.</td>
<td align="justify">No</td>
</tr>
<tr>
<td align="justify">EXTRA_FUNCTIONS</td>
<td align="justify">If set to TRUE (or unspecified), then some extra functions defined by <span class="application">Libgda</span> are added. The functions are:
<code class="function">gda_file_exists()</code>, <code class="function">gda_hex_print()</code>,
<code class="function">gda_hex()</code>, <code class="function">gda_rmdiacr()</code>,
<code class="function">gda_lower()</code> and <code class="function">gda_upper()</code>; see below
for more information about them.
</td>
<td align="justify">No</td>
</tr>
<tr>
<td align="justify">EXTRA_COLLATIONS</td>
<td align="justify">If set to TRUE (or unspecified), then some extra collations defined by <span class="application">Libgda</span> are added.
They are:
<code class="function">LOCALE</code> (the strings are compared taking into account UTF8 sorting and the
current locale) and <code class="function">DCASE</code> (before comparison, all the diacritical
signs (for example accents) are removed from the strings and they are converted to lower case).
</td>
<td align="justify">No</td>
</tr>
<tr>
<td align="justify">REGEXP</td>
<td align="justify">If set to TRUE (or unspecified), then the <code class="function">regexp()</code> and <code class="function">regexp_match()</code>
functions are defined. The <code class="function">regexp()</code> function is used by SQL statement with a
construct as "x REGEXP y", and the <code class="function">regexp_match()</code> is more general. The default for
this option is TRUE. See below for more information about this function.
</td>
<td align="justify">No</td>
</tr>
<tr>
<td align="justify">FK</td>
<td align="justify">Defines if foreign keys are enforced, by default, they are.</td>
<td align="justify">No</td>
</tr>
<tr>
<td align="justify">EXTENSIONS</td>
<td align="justify">Defines if SQLite extensions are allowed to be loaded, using the load_extension() function, default is to
deny loading extensions.</td>
<td align="justify">No</td>
</tr>
</tbody>
</table></div>
</div>
<p><br class="table-break">
</p>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="id-1.2.11.5.3"></a>The <code class="function">gda_file_exists()</code> function</h3></div></div></div>
<p>
This function accepts a filename as argument, and returns 0 if the file with that filename does not
exist, or 1 if it does.
</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="id-1.2.11.5.4"></a>The <code class="function">gda_hex_print()</code> function</h3></div></div></div>
<p>
This function accepts at most 2 arguments, in that order:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>a blob value</p></li>
<li class="listitem"><p>a length (not mandatory)</p></li>
</ul></div>
<p>
</p>
<p>
It returns a string suitable to be printed (where all the non ascii characters are converted to
the "\xyz" syntax where "xyz" is the decimal value of the character), limited to the specified
length if any.
</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="id-1.2.11.5.5"></a>The <code class="function">gda_hex()</code> function</h3></div></div></div>
<p>
This function accepts at most 2 arguments, in that order:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>a blob value</p></li>
<li class="listitem"><p>a length (not mandatory)</p></li>
</ul></div>
<p>
</p>
<p>
It returns a hex dump string of the blob value, limited to the specified length if any.
</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="id-1.2.11.5.6"></a>The <code class="function">gda_rmdiacr()</code> function</h3></div></div></div>
<p>
This function accepts at most 2 arguments, in that order:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>a string value</p></li>
<li class="listitem"><p>a case conversion to do (not mandatory), as a string which must be
'upper' or 'lower'</p></li>
</ul></div>
<p>
</p>
<p>
It returns a string where all the diacritical signs (for example accents) from the input string,
and optionally converts the string to upper or lower case if specified. This function takes into
account the current locale and is useful to do some text search.
</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="id-1.2.11.5.7"></a>The <code class="function">gda_upper()</code> and <code class="function">gda_lower()</code> functions</h3></div></div></div>
<p>
These function accept one string argument and convert it to upper or lower case, taking into account
the locale (the standard SQLite <code class="function">upper()</code> and <code class="function">lower()</code>
functions only operating on ASCII characters).
</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="id-1.2.11.5.8"></a>The <code class="function">regexp_match()</code> function</h3></div></div></div>
<p>
This function accepts at most 3 arguments, in that order:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>the string on which the regular expression will be applied</p></li>
<li class="listitem"><p>the regular expression to apply</p></li>
<li class="listitem"><p>the options (not mandatory)</p></li>
</ul></div>
<p>
</p>
<p>
The options are specified as a string where each character corresponds to a boolean flag (the presence of the
character meaning the flag is set). They are:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>'i': specifies a case insensitive matching</p></li>
<li class="listitem"><p>'m': specifies that the the "start of line" and "end of line" constructs match immediately
following or immediately before any newline in the string, respectively, as well as at the very start
and end of the string</p></li>
<li class="listitem"><p>'v': specifies that instead of returning 0 or 1 as a result for matching or non
matching, the function returns the string which actually matches, or NULL if not match was found</p></li>
</ul></div>
<p>
</p>
<p>
This function is implemented using GLib's Perl-compatible regular expressions implementation:
<a href="/usr/share/gtk-doc/html/glib/glib-Perl-compatible-regular-expressions.html#GRegex">GRegex</a>, itself based on the <a class="ulink" href="http://www.pcre.org/" target="_top">PCRE</a> library.
</p>
</div>
<p>
Also refer to the <a class="link" href="limitations_sqlite.html" title="For SQLite">SQLite's provider's limitations</a>.
</p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>
|