User Tools

Site Tools


api:dk11:net:tatukgis.ndk.tgis_dbsqlite

TGIS_DbSqlite class

DK11 for .NET | TatukGIS.NDK.TGIS_DbSqlite | Classes | Constructors | Fields | Methods | Properties

Class that can read Sqlite.

Available also on: Delphi.

Syntax

// C#
public class TGIS_DbSqlite : TGIS_DbAbstract
{
}
' VisualBasic
Public Class TGIS_DbSqlite
  Inherits TGIS_DbAbstract
End Class
// Oxygene
type
  TGIS_DbSqlite = public class( TGIS_DbAbstract )
  end;

Inheritance

→ TGIS_ObjectDisposable → TGIS_DbAbstract

Constructors

Inherited Overrides Protected
Name Visibility Description
TGIS_DbSqlite() public Constructor.
(Overrides TGIS_DbAbstract.TGIS_DbAbstract())

Fields

Inherited Protected
Name Visibility Description
FDialect protected SQL dialect name.
(Inherited from TGIS_DbAbstract)
FFullSafeParam protected if True, prefix with name is returned, otherwise only prefix.
(Inherited from TGIS_DbAbstract)
FGeometryType protected Internal geometry type.
(Inherited from TGIS_DbAbstract)
FiCodePage protected CodePage stored for optimization purposes.
(Inherited from TGIS_DbAbstract)
FiJoinCodePage protected JoinCodePage stored for optimization purposes.
(Inherited from TGIS_DbAbstract)
FInBatchMode protected True, if batch mode is enabled.
(Inherited from TGIS_DbAbstract)
FisDb2 protected Is DB2 dialect.
(Inherited from TGIS_DbAbstract)
FisInformix protected Is Informix dialect.
(Inherited from TGIS_DbAbstract)
FIsInitializedProvider protected Is provider initialized.
(Inherited from TGIS_DbAbstract)
FisInterbase protected Is Interbase dialect.
(Inherited from TGIS_DbAbstract)
FIsJDBC protected if True, JDBC is used.
(Inherited from TGIS_DbAbstract)
FisMsJet protected Is MsJet dialect.
(Inherited from TGIS_DbAbstract)
FisMsSql protected Is MsSql dialect.
(Inherited from TGIS_DbAbstract)
FisMySql protected Is MySql dialect.
(Inherited from TGIS_DbAbstract)
FisOracle protected Is Oracle dialect.
(Inherited from TGIS_DbAbstract)
FisPostgreSql protected Is PostgreSQL dialect.
(Inherited from TGIS_DbAbstract)
FisSqlite protected Is Sqlite dialect.
(Inherited from TGIS_DbAbstract)
FisSybase protected Is Sybase dialect.
(Inherited from TGIS_DbAbstract)
FMultiUserMode protected MultiUser mode.
(Inherited from TGIS_DbAbstract)
FNameMaxLength protected Sql name max length.
(Inherited from TGIS_DbAbstract)
FOnSQLExecute protected SQL execute event handler.
(Inherited from TGIS_DbAbstract)
FParameterPrefix protected Sql parameter prefix.
(Inherited from TGIS_DbAbstract)
FRowsetSize protected Number of rows fetched in batches from the cursor database (default 0).
(Inherited from TGIS_DbAbstract)
FUseTextParameters protected Use text parameters.
(Inherited from TGIS_DbAbstract)
options protected Engine options.
(Inherited from TGIS_DbAbstract)

Methods

Inherited Overrides Protected
Name Visibility Description
cursorClose public Free cursor allocated by CursorOpen().
(Overrides TGIS_DbAbstract.cursorClose)
cursorOpen public Allocate new cursor.
(Overrides TGIS_DbAbstract.cursorOpen)
FinalizeProvider public Finalize provider.
(Overrides TGIS_DbAbstract.FinalizeProvider)
getLastCursor public Get last opened cursor index.
(Overrides TGIS_DbAbstract.getLastCursor)
GetLastErrorMessage public Return last error message text.
(Overrides TGIS_DbAbstract.GetLastErrorMessage)
InitializeProvider public Initialize provider.
(Overrides TGIS_DbAbstract.InitializeProvider)
PreRecognize public Check if layer can read a file.
(Inherited from TGIS_DbAbstract)
safeParam public Get a safe parameter.
(Inherited from TGIS_DbAbstract)
sqlBindField public Obtain a bind number for a given field name.
(Overrides TGIS_DbAbstract.sqlBindField)
sqlBuild public Build new SQL layer.
(Overrides TGIS_DbAbstract.sqlBuild)
sqlConnect public Open database connection.
(Overrides TGIS_DbAbstract.sqlConnect)
sqlCreateFunction public Create a function on database site.
(Overrides TGIS_DbAbstract.sqlCreateFunction)
sqlDisconnect public Close database connection.
(Overrides TGIS_DbAbstract.sqlDisconnect)
sqlExec public Execute a command.
(Overrides TGIS_DbAbstract.sqlExec)
sqlGetBindedField public Get the field value for a shape given by a unique identity.
(Overrides TGIS_DbAbstract.sqlGetBindedField)
sqlGetParams public Get parameters list.
(Overrides TGIS_DbAbstract.sqlGetParams)
sqlInitialize public Initialize database flags and options.
(Inherited from TGIS_DbAbstract)
sqlLastInsertId public Get last inserted record id.
(Overrides TGIS_DbAbstract.sqlLastInsertId)
sqlQueryClose public Close the query.
(Overrides TGIS_DbAbstract.sqlQueryClose)
sqlQueryEof public Test for Eof on query.
(Overrides TGIS_DbAbstract.sqlQueryEof)
sqlQueryGeometryIsText public Is geometry data a text.
(Overrides TGIS_DbAbstract.sqlQueryGeometryIsText)
sqlQueryGetBlob public Get blob data type.
(Overrides TGIS_DbAbstract.sqlQueryGetBlob)
sqlQueryGetField public Get a field from the query by field name.
(Overrides TGIS_DbAbstract.sqlQueryGetField)
sqlQueryGetFieldById public Get a field from the query by field id.
(Overrides TGIS_DbAbstract.sqlQueryGetFieldById)
sqlQueryGetFieldIndex public Get field index from query.
(Overrides TGIS_DbAbstract.sqlQueryGetFieldIndex)
sqlQueryGetGeomObj public Get a geometry object from the query.
(Overrides TGIS_DbAbstract.sqlQueryGetGeomObj)
sqlQueryGetGeomPtr(string, int, int) public Get a geometry from the query.
sqlQueryGetGeomPtr(string, string, int, int) public Get a geometry from the query.
sqlQueryGetGeomVAR public Get a geometry from the query.
(Overrides TGIS_DbAbstract.sqlQueryGetGeomVAR)
sqlQueryGetGEOUID(int, int) public Get a GEO.UID from the query.
sqlQueryGetGEOUID(string, int) public Get a GEO.UID from the query.
sqlQueryGetSHAPETYPE public Get a SHAPETYE from the query.
(Overrides TGIS_DbAbstract.sqlQueryGetSHAPETYPE)
sqlQueryGetXMIN public Get a XMIN from the query.
(Overrides TGIS_DbAbstract.sqlQueryGetXMIN)
sqlQueryGetYMIN public Get a YMIN from the query.
(Overrides TGIS_DbAbstract.sqlQueryGetYMIN)
sqlQueryMoveFirst public Move to first record of query.
(Overrides TGIS_DbAbstract.sqlQueryMoveFirst)
sqlQueryMoveNext public Move to next record of query.
(Overrides TGIS_DbAbstract.sqlQueryMoveNext)
sqlQueryNameGEOUID public Get a GEO.UID field from the query.
(Overrides TGIS_DbAbstract.sqlQueryNameGEOUID)
sqlQueryOpen public Open the query.
(Overrides TGIS_DbAbstract.sqlQueryOpen)
sqlQueryReset public Reset current sql query.
(Overrides TGIS_DbAbstract.sqlQueryReset)
sqlQueryStructure public Fill the current layer structure based on the query.
(Overrides TGIS_DbAbstract.sqlQueryStructure)
sqlQueryUnPrepareGetGeom public Unprepare geometry access.
(Overrides TGIS_DbAbstract.sqlQueryUnPrepareGetGeom)
sqlTableAppend public Append a new record into the table.
(Overrides TGIS_DbAbstract.sqlTableAppend)
sqlTableClose public Close the table.
(Overrides TGIS_DbAbstract.sqlTableClose)
sqlTableCreateParam public Create a table parameter.
(Overrides TGIS_DbAbstract.sqlTableCreateParam)
sqlTableEof public Test for Eof on the table.
(Overrides TGIS_DbAbstract.sqlTableEof)
sqlTableGetField public Get a field from the table.
(Overrides TGIS_DbAbstract.sqlTableGetField)
sqlTableOpenRead public Open the table based on provided filter.
(Overrides TGIS_DbAbstract.sqlTableOpenRead)
sqlTableOpenWrite public Open the table based on provided filter
(Overrides TGIS_DbAbstract.sqlTableOpenWrite)
sqlTablePost public Update the table (after any change).
(Overrides TGIS_DbAbstract.sqlTablePost)
sqlTablePrepared public Is table prepared for insert.
(Overrides TGIS_DbAbstract.sqlTablePrepared)
sqlTableSetBlob public Set a blob data to the table.
(Overrides TGIS_DbAbstract.sqlTableSetBlob)
sqlTableSetField public Set a field to the table.
(Overrides TGIS_DbAbstract.sqlTableSetField)
sqlTableSetGeometry(int, string, OleVariant, TGIS_MemoryStream) public Set a geometry to the table.
sqlTableSetGeometry(int, string, TObject) public Set a geometry to the table.
sqlTransactGlobalUpdateCommit public Commit global transaction.
(Overrides TGIS_DbAbstract.sqlTransactGlobalUpdateCommit)
sqlTransactGlobalUpdateStart public Start global transaction.
(Overrides TGIS_DbAbstract.sqlTransactGlobalUpdateStart)
sqlTransactRestructCommit public Commit transaction.
(Overrides TGIS_DbAbstract.sqlTransactRestructCommit)
sqlTransactRestructStart public Start transaction.
(Overrides TGIS_DbAbstract.sqlTransactRestructStart)
sqlTransactRollback public Rollback global transaction.
(Overrides TGIS_DbAbstract.sqlTransactRollback)
sqlTransactUpdateCommit public Commit transaction.
(Overrides TGIS_DbAbstract.sqlTransactUpdateCommit)
sqlTransactUpdateStart public Start transaction.
(Overrides TGIS_DbAbstract.sqlTransactUpdateStart)
sqlUpdateStart public Macro for starting updates.
(Overrides TGIS_DbAbstract.sqlUpdateStart)

Properties

Inherited Protected
Name Visibility Description
CurrentSQLDialect public Current SQL dialect name.
(Inherited from TGIS_DbAbstract)
EngineOptions public Engine options.
(Inherited from TGIS_DbAbstract)
FullSafeParam public if True, prefix with name is returned, otherwise only prefix.
(Inherited from TGIS_DbAbstract)
GeometryType public Internal geometry type.
(Inherited from TGIS_DbAbstract)
iCodePage public CodePage used for conversion.
(Inherited from TGIS_DbAbstract)
iJoinCodePage public JoinCodePage used for conversion.
(Inherited from TGIS_DbAbstract)
InBatchMode public True, if batch mode is enabled for fast inserts.
(Inherited from TGIS_DbAbstract)
IsDb2 public Is DB2 dialect.
(Inherited from TGIS_DbAbstract)
IsInformix public Is Informix dialect.
(Inherited from TGIS_DbAbstract)
IsInterbase public Is Interbase dialect.
(Inherited from TGIS_DbAbstract)
IsJDBC public if True, JDBC is used.
(Inherited from TGIS_DbAbstract)
IsMsJet public Is MsJet dialect.
(Inherited from TGIS_DbAbstract)
IsMsSql public Is MsSql dialect.
(Inherited from TGIS_DbAbstract)
IsMySql public Is MySql dialect.
(Inherited from TGIS_DbAbstract)
IsOracle public Is Oracle dialect.
(Inherited from TGIS_DbAbstract)
IsPostgreSql public Is PostgreSQL dialect.
(Inherited from TGIS_DbAbstract)
IsProviderInitialized public Is provider initialized.
(Inherited from TGIS_DbAbstract)
IsSqlite public Is Sqlite dialect.
(Inherited from TGIS_DbAbstract)
IsSybase public Is Sybase dialect.
(Inherited from TGIS_DbAbstract)
MultiUserMode public Multiuser mode.
(Inherited from TGIS_DbAbstract)
NameMaxLength public Sql name maximum length.
(Inherited from TGIS_DbAbstract)
ParameterPrefix public Sql parameter prefix.
(Inherited from TGIS_DbAbstract)
RowsetSize public Number of rows fetched in batches from the cursor database (default 0).
(Inherited from TGIS_DbAbstract)
UseTextParameters public Use text parameters.
(Inherited from TGIS_DbAbstract)

Remarks

Database lock

According to SQLite3 locking reference after the start of the transaction, a SHARED lock will be acquired when the first SELECT statement is executed. Shared lock means that the database may be read but not written! A RESERVED lock will be acquired when the first INSERT, UPDATE, or DELETE statement is executed. The SQLite may inform us that the database is locked when we are trying to update, delete or insert while another select is in progress. The solution to this problem is :

  • close active select statement before any write operation
  • use WAL mode (reading and writing can proceed concurrently) by executing PRAGMA journal_mode=WAL

2019/09/05 17:05