LuaSQLite3

Check-in [c85464e1bc]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add docn for db:load_extension
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c85464e1bc5c5d48b34bf036c4432481678db0fd
User & Date: e 2015-01-06 03:06:59
Context
2015-01-06
04:51
Add lversion function; prepare for 0.9.3 release. check-in: f465f235ba user: e tags: trunk
03:06
Add docn for db:load_extension check-in: c85464e1bc user: e tags: trunk
2015-01-05
23:16
Add tests for load_extension. check-in: d1f2e3f61b user: e tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to doc/lsqlite3.wiki.

    35     35   		<li><a href="#db_create_function">db:create_function</a></li>
    36     36   		<li><a href="#db_errcode">db:errcode</a></li>
    37     37   		<li><a href="#db_errmsg">db:errmsg</a></li>
    38     38   		<li><a href="#db_exec">db:exec</a></li>
    39     39   		<li><a href="#db_interrupt">db:interrupt</a></li>
    40     40   		<li><a href="#db_isopen">db:isopen</a></li>
    41     41   		<li><a href="#db_last_insert_rowid">db:last_insert_rowid</a></li>
           42  +		<li><a href="#db_load_extension">db:load_extension</a></li>
    42     43   		<li><a href="#db_nrows">db:nrows</a></li>
    43     44   		<li><a href="#db_prepare">db:prepare</a></li>
    44     45   		<li><a href="#db_progress_handler">db:progress_handler</a></li>
    45     46           <li><a href="#db_rollback_hook">db:rollback_hook</a></li>
    46     47   		<li><a href="#db_rows">db:rows</a></li>
    47     48   		<li><a href="#db_total_changes">db:total_changes</a></li>
    48     49           <li><a href="#db_trace">db:trace</a></li>
................................................................................
    69     70   		<li><a href="#stmt_get_types">stmt:get_types</a></li>
    70     71   		<li><a href="#stmt_get_unames">stmt:get_unames</a></li>
    71     72   		<li><a href="#stmt_get_utypes">stmt:get_utypes</a></li>
    72     73   		<li><a href="#stmt_get_uvalues">stmt:get_uvalues</a></li>
    73     74   		<li><a href="#stmt_get_value">stmt:get_value</a></li>
    74     75   		<li><a href="#stmt_get_values">stmt:get_values</a></li>
    75     76   		<li><a href="#stmt_isopen">stmt:isopen</a></li>
           77  +        <li><a href="#stmt_last_insert_rowid">stmt:last_insert_rowid</a></li>
    76     78   		<li><a href="#stmt_nrows">stmt:nrows</a></li>
    77     79   		<li><a href="#stmt_reset">stmt:reset</a></li>
    78     80   		<li><a href="#stmt_rows">stmt:rows</a></li>
    79     81   		<li><a href="#stmt_step">stmt:step</a></li>
    80     82           <li><a href="#stmt_urows">stmt:urows</a></li>
    81         -        <li><a href="#stmt_last_insert_rowid">stmt:last_insert_rowid</a></li>
    82     83   	</ul>
    83     84   
    84     85   	<li><a href="#methods_for_callback_contexts">Methods for callback contexts</a></li>
    85     86   	<ul>
    86     87   
    87     88   		<li><a href="#context_aggregate_count">context:aggregate_count</a></li>
    88     89   		<li><a href="#context_get_aggregate_data">context:get_aggregate_data</a></li>
................................................................................
   369    370           db:exec'INSERT INTO test VALUES(3,6,16)'
   370    371           db:create_function('sum_cols',3,function(ctx,a,b,c)
   371    372             ctx:result_number(a+b+c)
   372    373           end))
   373    374           for col1,col2,col3,sum in db:urows('SELECT *,sum_cols(col1,col2,col3) FROM test') do
   374    375             util.printf('%2i+%2i+%2i=%2i\n',col1,col2,col3,sum)
   375    376           end</pre>
          377  +<p>
          378  +</p>
          379  +<h2><a name="db_load_extension">db:load_extension</a></h2>
          380  +<pre>
          381  +        db:load_extension([name,[entrypoint]])</pre>
          382  +
          383  +<p>When a <code>name</code> is provided, loads an SQLite extension library from the 
          384  +named file into this database connection. The optional <code>entrypoint</code> is the 
          385  +library initialization function name; if not supplied, SQLite tries various default 
          386  +entrypoint names. Returns <code>true</code> when successful, or <code>false</code> and 
          387  +an error string otherwise.
          388  +</p>
          389  +<p>When called with no arguments, disables the load_extension() SQL function, which is 
          390  +enabled as a side effect of calling <code>db:load_extension</code> with a 
          391  +<code>name</code>.
          392  +</p>
   376    393   <p>
   377    394   </p>
   378    395   <h2><a name="db_errcode">db:errcode</a></h2>
   379    396   <pre>
   380    397           db:errcode()
   381    398           db:error_code()</pre>
   382    399   <p>Returns the numerical result code (or extended result code) for the most