Main Page | Class Hierarchy | Compound List | Compound Members | Related Pages

SQLite Class Reference

List of all members.

Detailed Description

Root static class of the SQLite library.

The main function off here is open ().


Public Types

enum  OnConflict {
  None, Abort, Rollback, Fail,
  Ignore, Replace
}
 Conflict resolution algorithms that determine behaviour when a transaction fails. More...


Static Public Member Functions

Database open (char[] filename)
 Open a connection to the database.

bit escaped (char ch)
uint fquotedLength (char[] text)
 Return the number of bytes the identifier would take when quoted.

uint quotedLength (char[] text)
 Return the number of bytes the identifier would take when quoted.

 this ()
char[] quote (char[] string)
 Quote the identifer.

char[] fquote (char[] string)
 Quote the identifer.

int unquoteSkip (char[] string)
 Return the index of the character after the quote.

char[] unquote (char[] string)
 Remove quotes from an identifier.

char[] onConflictToString (OnConflict value)
char[] onConflictToName (OnConflict value)
char[] libraryVersion ()
 Return the version of the library.

char[] libraryEncoding ()
 Return the encoding of the library.


Static Public Attributes

bit[char[]] keywords
 Predefined keywords in SQLite.


Member Enumeration Documentation

enum SQLite::OnConflict
 

Conflict resolution algorithms that determine behaviour when a transaction fails.

Enumeration values:
None  No action is performed.
Abort  When a constraint violation occurs, the command backs out any prior changes it might have made and aborts.

But no rollback () is executed so changes from prior commands within the same transaction are preserved. This is the default behavior.

Rollback  When a constraint violation occurs, an immediate rollback () occurs, thus ending the current transaction, and the command aborts.

If no transaction is active (other than the implied transaction that is created on every command) then this algorithm works the same as Abort.

Fail  When a constraint violation occurs, the command aborts.

But any changes to the database that the command made prior to encountering the constraint violation are preserved and are not backed out. For example, if an update () statement encountered a constraint violation on the 100th row that it attempts to update, then the first 99 row changes are preserved but changes to rows 100 and beyond never occur.

Ignore  When a constraint violation occurs, the one row that contains the constraint violation is not inserted or changed.

But the command continues executing normally. Other rows before and after the row that contained the constraint violation continue to be inserted or updated normally. No error is returned.

Replace  When a Unique constraint violation occurs, the pre-existing rows that are causing the constraint violation are removed prior to inserting or updating the current row.

Thus the insert or update always occurs. The command continues executing normally. No error is returned. If a NotNull constraint violation occurs, the NULL value is replaced by the default value for that column. If the column has no default value, then the Abort algorithm is used.

When this conflict resolution strategy deletes rows in order to statisfy a constraint, it does not invoke delete triggers on those rows. But that may change in a future release.


Member Function Documentation

char [] SQLite.fquote charstring  []  )  [static]
 

Quote the identifer.

uint SQLite.fquotedLength chartext  []  )  [static]
 

Return the number of bytes the identifier would take when quoted.

char [] SQLite.libraryEncoding  )  [static]
 

Return the encoding of the library.

This is hopefully "iso8859".

char [] SQLite.libraryVersion  )  [static]
 

Return the version of the library.

At time of writing, this is "2.8.5".

Database SQLite.open charfilename  []  )  [static]
 

Open a connection to the database.

char [] SQLite.quote charstring  []  )  [static]
 

Quote the identifer.

uint SQLite.quotedLength chartext  []  )  [static]
 

Return the number of bytes the identifier would take when quoted.

char [] SQLite.unquote charstring  []  )  [static]
 

Remove quotes from an identifier.

int SQLite.unquoteSkip charstring  []  )  [static]
 

Return the index of the character after the quote.


Member Data Documentation

bit [char []] SQLite.keywords [static]
 

Predefined keywords in SQLite.


The documentation for this class was generated from the following file:
Generated on Thu Jul 31 08:40:54 2003 for sqlite by doxygen 1.3.2