~ubuntu-branches/ubuntu/hardy/sqlite3/hardy

« back to all changes in this revision

Viewing changes to www/capi3ref.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2007-05-17 02:01:42 UTC
  • mfrom: (1.1.8 upstream) (3.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20070517020142-o79d5uduuhfbtknv
Tags: 3.3.17-1
* New upstream release.
* Use minor version as well in sqlite3.pc (closes: #424235).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
set rcsid {$Id: capi3ref.tcl,v 1.51 2007/01/10 12:57:29 drh Exp $}
 
1
set rcsid {$Id: capi3ref.tcl,v 1.55 2007/04/16 15:35:24 drh Exp $}
2
2
source common.tcl
3
3
header {C/C++ Interface For SQLite Version 3}
4
4
puts {
5
 
<h2>C/C++ Interface For SQLite Version 3</h2>
 
5
<h2 class=pdf_section>C/C++ Interface For SQLite Version 3</h2>
6
6
}
7
7
 
8
8
proc api {name prototype desc {notused x}} {
429
429
<tr><td> BLOB </td><td>    TEXT </td><td>  Add a \\000 terminator if needed</td></tr>
430
430
</table>
431
431
</blockquote>
 
432
 
 
433
  Note that when type conversions occur, pointers returned by prior
 
434
  calls to sqlite3_column_blob(), sqlite3_column_text(), and/or
 
435
  sqlite3_column_text16() may be invalidated.  So, for example, if
 
436
  you initially call sqlite3_column_text() and get back a pointer to
 
437
  a UTF-8 string, then you call sqlite3_column_text16(), after the
 
438
  call to sqlite3_column_text16() the pointer returned by the prior
 
439
  call to sqlite3_column_text() will likely point to deallocated memory.
 
440
  Attempting to use the original pointer might lead to heap corruption
 
441
  or a segfault.  Note also that calls  to sqlite3_column_bytes()
 
442
  and sqlite3_column_bytes16() can also cause type conversion that
 
443
  and deallocate prior buffers.  Use these routines carefully.
432
444
}
433
445
 
434
446
api {} {
1350
1362
 the access attempt or NULL if this access attempt is directly from 
1351
1363
 input SQL code.
1352
1364
 
1353
 
 The return value of the authorization function should be one of the
 
1365
 The return value of the authorization callback function should be one of the
1354
1366
 constants SQLITE_OK, SQLITE_DENY, or SQLITE_IGNORE.  A return of
1355
1367
 SQLITE_OK means that the operation is permitted and that 
1356
1368
 sqlite3_prepare_v2() can proceed as normal.
1365
1377
 user-entered SQL.  An appropriate callback can deny the user-entered
1366
1378
 SQL access certain operations (ex: anything that changes the database)
1367
1379
 or to deny access to certain tables or columns within the database.
 
1380
 
 
1381
 SQLite is not reentrant through the authorization callback function.
 
1382
 The authorization callback function should not attempt to invoke
 
1383
 any other SQLite APIs for the same database connection.  If the
 
1384
 authorization callback function invokes some other SQLite API, an
 
1385
 SQLITE_MISUSE error or a segmentation fault may result.
1368
1386
}
1369
1387
 
1370
1388
api {} {
1621
1639
  thread-specific storage so that it will be available for sharing
1622
1640
  with other connections.
1623
1641
 
 
1642
  Virtual tables cannot be used with a shared cache.  When shared
 
1643
  cache is enabled, the sqlite3_create_module() API used to register
 
1644
  virtual tables will always return an error.
 
1645
 
1624
1646
  This routine returns SQLITE_OK if shared cache was
1625
1647
  enabled or disabled successfully.  An error code is returned
1626
1648
  otherwise.
1716
1738
#parray name_to_idx
1717
1739
#parray sname
1718
1740
incr n -1
 
1741
puts "<DIV class=pdf_ignore>"
1719
1742
puts {<table width="100%" cellpadding="5"><tr>}
1720
1743
set nrow [expr {($n+2)/3}]
1721
1744
set i 0
1734
1757
}
1735
1758
puts "</table>"
1736
1759
puts "<!-- $n entries.  $nrow rows in 3 columns -->"
 
1760
puts "</DIV>"
1737
1761
 
1738
1762
proc resolve_name {ignore_list name} {
1739
1763
  global name_to_idx
1750
1774
  set done($i) 1
1751
1775
  foreach {namelist prototype desc} [lindex $apilist $i] break
1752
1776
  foreach name $namelist {
1753
 
    puts "<a name=\"$name\">"
 
1777
    puts "<a name=\"$name\"></a>"
1754
1778
  }
1755
1779
  puts "<p><hr></p>"
1756
1780
  puts "<blockquote><pre>"
1767
1791
  puts "<p>$d3</p>"
1768
1792
}
1769
1793
 
 
1794
puts "<DIV class=pdf_ignore>"
1770
1795
footer $rcsid
 
1796
puts "</DIV>"