Andreas Volz <[EMAIL PROTECTED]> wrote:
> 
> I don't understand how to use the sqlite3_io_methods. It seems I need a
> sqlite3_file. Not sure I get it from the API. The sqlite3_open call
> returns an int. So how do I use this?
> 
> Perhaps you could sketch some pseudo code or paste some code where
> locking with SQLITE_BUSY and SQLITE_LOCKED is used.
> 

There are seven examples of using sqlite3_io_methods in the
source tree.

All three of the operating-system adaptors for sqlite are
implemented using sqlite3_io_methods.  See os_unix.c, os_win.c,
and os_os2.c.

The test_onefile.c file contains an example backend for use
on embedded platforms that lack a file system.  test_onefile.c
is designed to read and write directly to hardware (such as
a flash memory chip.)

The test_async.c file demonstrates how to modify SQLite to
implement asynchronous I/O.  This gives the appearance of
much faster COMMITs at the cost of Durability.

The test6.c source file simulates the kind of file system
damage that occurs during a sudden power loss.  This module
is used to test SQLite in order to verify that it will not
corrupt the database file during a power loss.

The journal.c file contains an optimization which avoids
creating a journal file during commits on systems that
support atomic sector writes.

--
D. Richard Hipp <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to