DatabaseFile

Description

sealed class Tinman.AddOns.SQLite.DatabaseFile

Derived from

Disposable abstract
IPathInfo
INativeHandle

Full source code is included in the Tinman 3D SDK download.

The DatabaseFile is a wrapper for a native sqlite3* pointer to a database file.

The Begin and End methods may be used to create a single transaction, which will span the outermost call pair.

Public / Constructors

For


[OwnerReturn]
public static method For → (2)

file in : Path

[not-null]
The database file path.

mode opt : int32 = 0

The database file mode:
< 0 : open an existing database file in read-only mode,
= 0 : open an existing database file in read/write mode,
> 0 : create a new database file and overwrite the existing one, if any.

returns → DatabaseFile

The created DatabaseFile object.

Creates a new instance of DatabaseFile.

IOException

If an I/O error has occurred.

Public / Methods

Begin


public method Begin → ()

Begins a new transaction.

IOException

If an I/O error has occurred.

Cancel


public method Cancel → ()

The current transaction will be cancelled when End is called.

End


public method End → ()

Ends the current transaction.

IOException

If an I/O error has occurred.

Execute


public method Execute → (1)

sql in : string

[not-null]
The SQL statement to execute.

Executes the given sql in statement.

IOException

If an I/O error has occurred.

Execute​All

2 overloads


public method ExecuteAll1 → (1)

sqls in : string [ ]

[not-null]
The SQL statements to execute.

Executes the given sqls in statements.

IOException

If an I/O error has occurred.


public method ExecuteAll2 → (1)

sqls in : IEnumerable<string>

[not-null]
The SQL statements to execute.

Executes the given sqls in statements.

IOException

If an I/O error has occurred.

Prepare


[OwnerReturn]
public method Prepare → (2)

sql in : string

[not-null]
The SQL statement to prepare.

persistent opt : bool = true

Use SQLite3.PREPARE_PERSISTENT?

returns → PreparedStatement

The PreparedStatement wrapper.

Prepares the given sql in statement.

IOException

If an I/O error has occurred.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.