SQL - Extended
1.0.0
Pi-Con: Small utilities makes the difference
|
Copyright (C) 2020 Pi-Con - All rights reserved.
SQLite basic commands with bindings
Definition: SQLiteCommand.cs:43
bool Trace
Whether to writer queries to Tracer during execution.
Definition: SQLiteConnection.cs:90
void Backup(string destinationDatabasePath, string databaseName="main")
Backup the entire database to the specified path.
Definition: SQLiteConnection.cs:2077
bool IsValid
True when the Many To Many realtion is a valid structure.
Definition: ManyToManyStructure.cs:42
Action< SQLiteConnection > PostKeyAction
Readonly, set by a constructor of the SQLConnection Action after setting the key for SQLCipher data...
Definition: SQLiteConnectionString.cs:109
TableMapping GetMapping< T >(CreateFlags createFlags=CreateFlags.None)
Retrieves the mapping that is automatically generated for the given type.
Definition: SQLiteConnection.cs:409
A pooled asynchronous connection to a SQLite database.
Definition: SQLiteAsync.cs:36
void BeginTransaction()
Begins a new transaction. Call Commit to end the transaction.
Definition: SQLiteConnection.cs:1209
Task< int > DropTableAsync(TableMapping map)
Executes a "drop table" on the database. This is non-recoverable.
Definition: SQLiteAsync.cs:408
Reactions
Enum for the actions On Update and On Delete i n the Foreign Key See the SQLite-Net documnetation for...
Definition: Reactions.cs:14
This is a normal connection except it contains a Lock method that can be used to serialize access to ...
Definition: SQLiteAsync.cs:1490
bool StoreTimeSpanAsTicks
Definition: SQLiteConnectionString.cs:67
IEnumerable< object > DeferredQuery(TableMapping map, string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteConnection.cs:1029
FKReference(Type tableType, string columnName, Type fkTableType, string fkColumnName)
Constructor for FKReferences
Definition: FKReference.cs:58
int Insert(object obj, string extra, Type objType)
Inserts the given object (and updates its auto incremented primary key if it has one)....
Definition: SQLiteConnection.cs:1709
TableAttribute(string name)
Constructor
Definition: TableAttribute.cs:58
SQLiteOpenFlags
Flags to specify the connection type
Definition: SQLiteOpenFlags.cs:37
UniqueAttribute()
Default constructor
Definition: UniqueAttribute.cs:25
TableQuery(SQLiteConnection conn)
Filters the query based on a predicate.
Definition: TableQuery.cs:118
Attribute to to store the Enum as Text.
Definition: StoreAsTextAttribute.cs:37
bool SkipLock
Gets or sets a value indicating whether this T:SQLite.SQLiteConnectionWithLock skip lock.
Definition: SQLiteAsync.cs:1507
T ExecuteScalar< T >()
Query one item of just one Row
Definition: SQLiteCommand.cs:208
Task< CreateTablesResult > CreateTablesAsync< T, T2, T3, T4 >(CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database for each type. It also creates any specified ...
Definition: SQLiteAsync.cs:351
AsyncTableQuery< T > OrderByDescending< U >(Expression< Func< T, U >> orderExpr)
Order the query results according to a key.
Definition: SQLiteAsync.cs:1270
Task< int > InsertAllAsync(IEnumerable objects, Type objType, bool runInTransaction=true)
Inserts all specified objects.
Definition: SQLiteAsync.cs:1002
string DateTimeStringFormat
Readonly, set by a constructor of the SQLConnection the date and time format, as stored on the databa...
Definition: SQLiteConnectionString.cs:74
List< T > RelatedData< T >(Object currentObject)
Get all teh related data from the specified type with the foreignkeys as defined in the database sche...
Definition: SQLiteConnOneToMany.cs:265
Task BackupAsync(string destinationDatabasePath, string databaseName="main")
Backup the entire database to the specified path.
Definition: SQLiteAsync.cs:724
ForeignKeyAttribute(Type fkTableType, string fkColumnName="Id")
Constructor for the Foreign Key Attribute
Definition: ForeignKeyAttribute.cs:19
ColumnRight RightColumn
Right Column (data - object)
Definition: ManyToManyRefColumns.cs:20
bool Conditional
If true we have conditional preserving, has to be defined.
Definition: PreserveAttribute.cs:45
EventHandler< NotifyTableChangedEventArgs > TableChanged
Handler for the Event - Notification
Definition: SQLiteConnection.cs:2196
Data class for the Many to Many relations in the database.
Definition: ManyToManyStructure.cs:12
PrimaryKeyAttribute(PKSort sort, Conflict onConflict)
PrimaryKeyAttribute has more options,
Definition: PrimaryKeyAttribute.cs:49
int Insert(object obj)
Inserts the given object (and updates its auto incremented primary key if it has one)....
Definition: SQLiteConnection.cs:1596
static void ResetPool()
Closes all connections to all async databases. You should never need to do this. This is a blocking o...
Definition: SQLiteAsync.cs:195
string GetByPrimaryKeySql
Full parsed string with the SQL-Command to get the Primary Key Column
Definition: TableMapping.cs:81
Collations
The collating sequence to use on a column.
Definition: Collations.cs:35
System.Globalization.DateTimeStyles DateTimeStyle
Readonly, set by a constructor of the SQLConnection the date and time style, of the local system
Definition: SQLiteConnectionString.cs:81
void Dispose()
Disposing the command
Definition: PreparedSqlLiteInsertCommand.cs:139
Action< SQLiteConnection > PreKeyAction
Readonly, set by a constructor of the SQLConnection Action prior the setting the key for SQLCipher ...
Definition: SQLiteConnectionString.cs:102
Task< int > DeleteAsync(Expression< Func< T, bool >> predExpr)
Delete all the rows that match this query and the given predicate.
Definition: SQLiteAsync.cs:1366
static string ForeignKeyFullString(TableMapping.Column column)
Get the Fullname of the Attribute - ForeignKey
Definition: SQLDeclExtent.cs:99
T FirstOrDefault(Expression< Func< T, bool >> predExpr)
Returns the first element of this query that matches the predicate, or null if no element is found.
Definition: TableQuery.cs:820
static string databaseName
The database schema name
Definition: DatabaseSettings.cs:11
static DatabaseType databaseType
The type of the database (MariaDb, SQLite, mySQL)
Definition: DatabaseSettings.cs:31
Task< int > DeleteAllAsync< T >()
Deletes all the objects from the specified table. WARNING WARNING: Let me repeat. It deletes ALL the ...
Definition: SQLiteAsync.cs:698
List< T > QueryFk< T >(string queyrstring)
A Query of a SQL command, method is needed for the QueryTableMapFk method Query as defined SQLConncti...
Definition: SQLiteConnExtended.cs:437
Dictionary< string, object > PksLastUsed
Primary key last used in the TableMapping for automatic update of the related tables – the List<T> or...
Definition: SQLiteConnExtended.cs:68
Column[] InsertOrReplaceColumns
Public array of all columns for the InsertOrReplace, that are all columns
Definition: TableMapping.cs:430
AsyncTableQuery< T > ThenBy< U >(Expression< Func< T, U >> orderExpr)
Order the query results according to a key.
Definition: SQLiteAsync.cs:1278
int InsertAll(System.Collections.IEnumerable objects, bool runInTransaction=true)
Inserts all specified objects.
Definition: SQLiteConnection.cs:1486
Type MappedType
Type of the object we map
Definition: TableMapping.cs:49
Definition: DatabaseSettings.cs:5
TableQuery< T > Where(Expression< Func< T, bool >> predExpr)
Filters the query based on a predicate.
Definition: TableQuery.cs:152
void Bind(string name, object val)
Adds new Binding
Definition: SQLiteCommand.cs:279
Task< T > FirstAsync(Expression< Func< T, bool >> predExpr)
Returns the first element of this query that matches the predicate.
Definition: SQLiteAsync.cs:1350
@ AllImplicit
Create a primary key for a property called 'Id' and create an indices for properties ending in 'Id' (...
void EnableWriteAheadLogging()
Enables the write ahead logging. WAL is significantly faster in most scenarios by providing better co...
Definition: SQLiteConnection.cs:237
bool Trace
Whether to writer queries to Tracer during execution.
Definition: SQLiteAsync.cs:159
T ExecuteScalar< T >(string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteConnection.cs:888
Task< int > DeleteAsync(object primaryKey, TableMapping map)
Deletes the object with the specified primary key.
Definition: SQLiteAsync.cs:682
string Name
Name of the Column used in the Database - Table
Definition: TableMapping.cs:485
Task< int > InsertAllAsync(IEnumerable objects, string extra, bool runInTransaction=true)
Inserts all specified objects.
Definition: SQLiteAsync.cs:982
Task CloseAsync()
Closes any pooled connections used by the database.
Definition: SQLiteAsync.cs:219
Task< object > GetAsync(object pk, TableMapping map)
Attempts to retrieve an object with the given primary key from the table associated with the specifie...
Definition: SQLiteAsync.cs:766
@ ImplicitIndex
Create indices for properties ending in 'Id' (case-insensitive).
void Rollback()
Rolls back the transaction that was begun by BeginTransaction or SaveTransactionPoint.
Definition: SQLiteConnection.cs:1310
string DatabasePath
Readonly, set by a constructor of the SQLConnection the Path to the SQLIte-Net Database
Definition: SQLiteConnectionString.cs:53
Sqlite3DatabaseHandle Handle
The handle to the Connection of the SQL-Net 3
Definition: SQLiteConnection.cs:66
Since the insert never changed, we only need to prepare once.
Definition: PreparedSqlLiteInsertCommand.cs:38
Task< CreateTableResult > CreateTableAsync(Type ty, CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database. It also creates any specified indexes on the...
Definition: SQLiteAsync.cs:304
Dictionary< int, string > EnumValues
The dictionary of the cache with the values.
Definition: EnumCacheInfo.cs:86
virtual SQLiteCommand NewCommand()
Creates a new SQLiteCommand. Can be overridden to provide a sub-class.
Definition: SQLiteConnection.cs:770
Task< int > CreateIndexAsync(string indexName, string tableName, string[] columnNames, bool unique=false)
Creates an index for the specified table and columns.
Definition: SQLiteAsync.cs:454
bool WithoutRowId
True we use the Database -Table without a Rowid() See SQL-Net documentation for more details....
Definition: TableMapping.cs:63
SQLiteOpenFlags OpenFlags
Readonly, set by a constructor of the SQLConnection Flags we use to open the connection
Definition: SQLiteConnectionString.cs:95
Type TableType
the type of the (child) table
Definition: FKReference.cs:22
TableQuery< T > Skip(int n)
Skips a given number of elements from the query and then yields the remainder.
Definition: TableQuery.cs:219
int ExecuteNonQuery(object[] source)
Execute a Command and return the count of the affected record
Definition: PreparedSqlLiteInsertCommand.cs:82
List< FKReference > ForeignKeys
A list of the Foreign Keys used by the current objects
Definition: SQLiteConnExtended.cs:75
Task< List< T > > QueryAsync< T >(string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteAsync.cs:1094
Attribute to limit the length of the string column
Definition: MaxLengthAttribute.cs:38
IEnumerable< TableMapping.Column > Columns
Columns off TableMapping to determine the violation
Definition: NotNullConstraintViolationException.cs:44
bool PragmaForeignKeys
Bool value for updating / resets of the foreign key PRAGMA in the database
Definition: SQLiteConnExtended.cs:80
PKSort
Enum for sorting on the Primary Key
Definition: PKSort.cs:13
int CleanManyToManyRefTable(ManyToManyStructure mtm)
Remove the orphant entries in the reference table of the Many To Many realtion. That means it will lo...
Definition: SQLiteConnExtended.cs:362
T First()
Returns the first element of this query.
Definition: TableQuery.cs:793
NotifyTableChangedAction
Type action of the notification
Definition: NotifyTableChangedAction.cs:35
AsyncTableQuery< T > Where(Expression< Func< T, bool >> predExpr)
Filters the query based on a predicate.
Definition: SQLiteAsync.cs:1238
Task< T > FirstOrDefaultAsync(Expression< Func< T, bool >> predExpr)
Returns the first element of this query that matches the predicate.
Definition: SQLiteAsync.cs:1358
string? ForeignKeyName
The name of the Foreign Key, used in the create table function
Definition: ForeignKeyAttribute.cs:44
CollationAttribute(Collations collation)
Constructor
Definition: CollationAttribute.cs:68
Task< T > ExecuteScalarAsync< T >(string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteAsync.cs:1070
string PropertyName
Name of the local property
Definition: TableMapping.cs:502
List< Object > PropertyValues
the values of the property / column for multiple rows
Definition: TableMapping.cs:496
bool StoreDateTimeAsTicks
Whether to store DateTime properties as ticks (true) or strings (false).
Definition: SQLiteAsync.cs:147
int CreateIndex(string tableName, string columnName, bool unique=false)
Creates an index for the specified table and column.
Definition: SQLiteConnection.cs:680
T Get< T >(object pk)
Attempts to retrieve an object with the given primary key from the table associated with the specifie...
Definition: SQLiteConnection.cs:1060
SQLiteConnection(SQLiteConnectionString connectionString)
Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath.
Definition: SQLiteConnection.cs:174
CollationAttribute(string collation)
Constructor of the attribute
Definition: CollationAttribute.cs:57
bool WithoutRowId
Flag whether to create the table without rowid (see https://sqlite.org/withoutrowid....
Definition: TableAttribute.cs:52
bool StoreAsText
store the value as Text,
Definition: TableMapping.cs:557
int Count()
Execute SELECT COUNT(*) on the query
Definition: TableQuery.cs:739
List< ColumnInfo > GetTableInfo(string tableName)
Query the built-in sqlite table_info table for a specific tables columns.
Definition: SQLiteConnection.cs:733
int WriteManyToManyRefTable(object obj, ManyToManyStructure mtm)
Write - Insert into the reference table of the Many to Many relation in the database from one object....
Definition: SQLiteConnExtended.cs:241
int Value
the value of the max allowed characters
Definition: MaxLengthAttribute.cs:44
CreateFlags
Flags for Primary Keys when the table is Created.
Definition: CreateFlags.cs:38
void RunInTransaction(Action action)
Executes action within a (possibly nested) transaction by wrapping it in a SAVEPOINT....
Definition: SQLiteConnection.cs:1459
string FkColumnName
The ForeignKey Column in the (parent) Table
Definition: ForeignKeyAttribute.cs:36
int DeleteAll(TableMapping map)
Deletes all the objects from the specified table. WARNING WARNING: Let me repeat. It deletes ALL the ...
Definition: SQLiteConnection.cs:2063
@ FullTextSearch3
Create virtual table using FTS3
TableQuery< T > Deferred()
Option to deferre the request
Definition: TableQuery.cs:243
@ ImplicitPK
Create a primary key index for a property called 'Id' (case-insensitive). This avoids the need for th...
List< T > AllToMany< T >(List< T > baseRecords, bool isRecursive, bool fetchManyToMany)
Get ALL the data and the other columns from the database with the specified type, if the option isRec...
Definition: SQLiteConnOneToMany.cs:190
Task< int > InsertOrReplaceAsync(object obj, Type objType)
Inserts the given object (and updates its auto incremented primary key if it has one)....
Definition: SQLiteAsync.cs:582
Reactions OnDelete
The On Delete option for the Foreign Key, works only when the PRAGMA Foreign Keys is set Default is o...
Definition: ForeignKeyAttribute.cs:65
Action< string > Tracer
The delegate responsible for writing trace lines.
Definition: SQLiteAsync.cs:169
AsyncTableQuery< T > OrderBy< U >(Expression< Func< T, U >> orderExpr)
Order the query results according to a key.
Definition: SQLiteAsync.cs:1262
string VfsName
Readonly, set by a constructor of the SQLConnection the Virtual File System to use on the database.
Definition: SQLiteConnectionString.cs:116
object Get(object pk, TableMapping map)
Attempts to retrieve an object with the given primary key from the table associated with the specifie...
Definition: SQLiteConnection.cs:1081
bool IsInTransaction
Whether BeginTransaction has been called and the database is waiting for a Commit.
Definition: SQLiteConnection.cs:1201
Task< IEnumerable< object > > DeferredQueryAsync(TableMapping map, string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteAsync.cs:1189
int Delete()
Delete all the rows that match this query.
Definition: TableQuery.cs:171
int CreateIndex(string tableName, string[] columnNames, bool unique=false)
Creates an index for the specified table and columns.
Definition: SQLiteConnection.cs:691
Column FindColumnWithPropertyName(string propertyName)
Find the column find the name use in the object
Definition: TableMapping.cs:454
bool IsEnum
If the given type is a enum
Definition: EnumCacheInfo.cs:74
Ordering on a Column name.
Definition: BaseTableQuery.cs:40
Task< int > UpdateAsync(object obj, Type objType)
Updates all of the columns of a table using the specified object except for its primary key....
Definition: SQLiteAsync.cs:617
IndexedAttribute(string name, int order)
Constructor
Definition: IndexedAttribute.cs:71
bool TimeExecution
Whether Trace lines should be written that show the execution time of queries.
Definition: SQLiteConnection.cs:84
IndexedAttribute()
Constructor
Definition: IndexedAttribute.cs:62
int UpSertAll(IEnumerable objects, bool runInTransaction=true, bool resetValues=true, bool manyToManyClean=false)
Inserts or Updates (UpSert) the given objects The lib version should be at least 3....
Definition: SQLiteConnUpsert.cs:68
bool StoreTimeSpanAsTicks
Whether to store TimeSpan properties as ticks (true) or strings (false).
Definition: SQLiteConnection.cs:106
int UpSert(object obj, Type objType, bool resetValues=true, bool manyToManyClean=false)
Inserts or Update (UpSert) the given object The lib version should be at least 3.24....
Definition: SQLiteConnUpsert.cs:146
List< ManyToManyStructure > CheckManyToMany< T >()
Check if there are Many to Many relations on the specified table, Left Table see the Demo for princip...
Definition: SQLiteConnManyToMany.cs:307
int InsertOrReplace(object obj)
Inserts the given object (and updates its auto incremented primary key if it has one)....
Definition: SQLiteConnection.cs:1619
bool AllMembers
If true we preserve all members
Definition: PreserveAttribute.cs:40
AsyncTableQuery< T > ThenByDescending< U >(Expression< Func< T, U >> orderExpr)
Order the query results according to a key.
Definition: SQLiteAsync.cs:1286
Type FkTypeTable
The Foreign key Table (parent)
Definition: ForeignKeyAttribute.cs:30
Task< int > InsertAllAsync(IEnumerable objects, bool runInTransaction=true)
Inserts all specified objects.
Definition: SQLiteAsync.cs:962
Task< CreateTablesResult > CreateTablesAsync< T, T2, T3, T4, T5 >(CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database for each type. It also creates any specified ...
Definition: SQLiteAsync.cs:369
Task< int > InsertOrReplaceAsync(object obj)
Inserts the given object (and updates its auto incremented primary key if it has one)....
Definition: SQLiteAsync.cs:560
AsyncTableQuery(TableQuery< T > innerQuery)
Creates a new async query that uses given the synchronous query.
Definition: SQLiteAsync.cs:1206
T ElementAt(int index)
Returns the element at a given index
Definition: TableQuery.cs:229
MatchReactions
Enum to define the match option in the Foreign Key. see SQLite-Net documentation for more details
Definition: MatchReactions.cs:11
AsyncTableQuery< T > Skip(int n)
Skips a given number of elements from the query and then yields the remainder.
Definition: SQLiteAsync.cs:1246
List< T > TablesManyToMany< T >(Expression< Func< T, bool >> predicate, bool isRecursive=false)
Get the Many To Many data from the database with the specified type, only the fields marked as Many T...
Definition: SQLiteConnManyToMany.cs:80
TableQuery< T > Take(int n)
Yields a given number of elements from the query and then skips the remainder.
Definition: TableQuery.cs:209
check for a violation of the constraints in the table.
Definition: NotNullConstraintViolationException.cs:38
int Delete< T >(object primaryKey)
Deletes the object with the specified primary key.
Definition: SQLiteConnection.cs:1985
TableMapping Table
the mapping of the table we use, only one table - map
Definition: TableQuery.cs:54
static string password
The password to use to connect to the MySQL database.
Definition: DatabaseSettings.cs:21
Task< int > ExecuteAsync(string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteAsync.cs:946
Task< List< SQLiteConnection.ColumnInfo > > GetTableInfoAsync(string tableName)
Query the built-in sqlite table_info table for a specific tables columns.
Definition: SQLiteAsync.cs:924
List< T > QueryScalars< T >(string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteConnection.cs:950
bool IsPK
True - Column is Primary Key, has PrimaryKeyAttribute
Definition: TableMapping.cs:533
Definition: ColumnInfo.cs:33
SQLiteAsyncConnection(string databasePath, SQLiteOpenFlags openFlags, bool storeDateTimeAsTicks=true)
Constructs a new SQLiteAsyncConnection and opens a pooled SQLite database specified by databasePath.
Definition: SQLiteAsync.cs:77
Attribute to ingnore adding to the database
Definition: IgnoreAttribute.cs:38
TableMapping SetMapping(Type type, CreateFlags createFlags=CreateFlags.None, object obj=null, SQLiteConnection conn=null)
Set the complete Mapping of the table with all the options the columns:
Definition: TableMapping.cs:128
TableMapping Table
the mapping of the table for the notification
Definition: NotifyTableChangedEventArgs.cs:43
Task< List< object > > QueryAsync(TableMapping map, string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteAsync.cs:1139
Task< int > InsertAsync(object obj, string extra, Type objType)
Inserts the given object (and updates its auto incremented primary key if it has one)....
Definition: SQLiteAsync.cs:541
Reactions OnUpdate
The On Update option for the Foreign Key, works only when the PRAGMA Foreign Keys is set Default is o...
Definition: ForeignKeyAttribute.cs:58
void EnableLoadExtension(bool enabled)
Enable or disable extension loading.
Definition: SQLiteConnection.cs:287
int? MaxStringLength
Max count of characters in a string
Definition: TableMapping.cs:551
int Delete(object objectToDelete)
Deletes the given object from the database using its primary key.
Definition: SQLiteConnection.cs:1958
Task< int > InsertAsync(object obj)
Inserts the given object and retrieves its auto incremented primary key if it has one.
Definition: SQLiteAsync.cs:481
CreateTablesResult CreateTables(CreateFlags createFlags=CreateFlags.None, params Type[] types)
Executes a "create table if not exists" on the database for each type. It also creates any specified ...
Definition: SQLiteConnection.cs:637
Definition: SQLiteAsync.cs:1380
SQLiteConnectionString(string databasePath, SQLiteOpenFlags openFlags, bool storeDateTimeAsTicks, object key=null, Action< SQLiteConnection > preKeyAction=null, Action< SQLiteConnection > postKeyAction=null, string vfsName=null, string dateTimeStringFormat=DateTimeSqliteDefaultFormat, bool storeTimeSpanAsTicks=true)
Constructs a new SQLiteConnectionString with all the data needed to open an SQLiteConnection.
Definition: SQLiteConnectionString.cs:222
int notnull
notnull as int
Definition: ColumnInfo.cs:58
TableQuery< T > OrderBy< U >(Expression< Func< T, U >> orderExpr)
Order the query results according to a key.
Definition: TableQuery.cs:253
void Bind(object val)
Binding the object
Definition: SQLiteCommand.cs:292
int ExecuteNonQuery()
Perform a prepared SQL-command
Definition: SQLiteCommand.cs:71
Attribute to create a Index in the database / table
Definition: IndexedAttribute.cs:38
List< T > Query< T >(string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteConnection.cs:929
Class to store the information of a cacheitem (EnumCache)
Definition: EnumCacheInfo.cs:40
static NotNullConstraintViolationException New(SQLiteException exception, TableMapping mapping, object obj)
Constructor
Definition: NotNullConstraintViolationException.cs:110
Task< int > CreateIndexAsync< T >(Expression< Func< T, object >> property, bool unique=false)
Creates an index for the specified object property. e.g. CreateIndex<Client>(c => c....
Definition: SQLiteAsync.cs:466
ColumnAttribute(string name)
Defalut Constructor
Definition: ColumnAttribute.cs:51
List< T > ManyToMany< T >(List< T > baseRecords, bool isRecursive=false)
Get the Many To Many data from the database with the specified type, for the records as specified
Definition: SQLiteConnManyToMany.cs:113
bool Ascending
type of sorting
Definition: BaseTableQuery.cs:52
void SetForeignKeysPragma(bool setOn=false)
Set the PRAGAMA foreignkeys, be aware that this can lead into unrequested errors on the database espe...
Definition: SQLiteConnExtended.cs:95
Extra Attributes information for the creation of the tables
Definition: SQLDeclExtent.cs:14
TableQuery< T > ThenBy< U >(Expression< Func< T, U >> orderExpr)
Order the query results according to a key.
Definition: TableQuery.cs:269
Conflict OnConflict
the action when we have a conflict in the PK, see SQLite-Net documenation for more infromation
Definition: PrimaryKeyAttribute.cs:64
TimeSpan GetBusyTimeout()
The amount of time to wait for a table to become unlocked.
Definition: SQLiteAsync.cs:113
Task< T > FindWithQueryAsync< T >(string query, params object[] args)
Attempts to retrieve the first object that matches the query from the table associated with the speci...
Definition: SQLiteAsync.cs:857
TableMapping(Type type, CreateFlags createFlags=CreateFlags.None, object obj=null, SQLiteConnection conn=null)
Set the complete Mapping of the table with all the options the columns:
Definition: TableMapping.cs:112
TableQuery< T > OrderByDescending< U >(Expression< Func< T, U >> orderExpr)
Order the query results according to a key.
Definition: TableQuery.cs:261
Definition: DatabaseSettings.cs:7
IEnumerable< TableMapping > TableMappings
Returns the mappings from types to tables that the connection currently understands.
Definition: SQLiteAsync.cs:187
int Count(Expression< Func< T, bool >> predExpr)
Execute SELECT COUNT(*) on the query with an additional WHERE clause.
Definition: TableQuery.cs:747
List< ManyToManyStructure > CheckManyToMany(Type typeLeftTable)
Check if there are Many to Many relations on the specified table, Left Table see the Demo for princip...
Definition: SQLiteConnManyToMany.cs:323
NotifyTableChangedEventArgs(TableMapping table, NotifyTableChangedAction action)
Constructor
Definition: NotifyTableChangedEventArgs.cs:56
string Collation
The collation of the column
Definition: TableMapping.cs:514
bool IsAutoInc
True - column is a auto incrementing (int) has the AutoIncrement Attribute
Definition: TableMapping.cs:521
The Attribute Foreign Key for the relations in the database.
Definition: ForeignKeyAttribute.cs:14
IEnumerable< T > ExecuteDeferredQuery< T >()
Query deferred items of type, the TableMapping will be fetched according the type
Definition: SQLiteCommand.cs:110
Expression< Func< T, bool > > MakePredicate< T >(string columnName, Object parentIdObj)
Construct a predicate to specify the fetched data Specieied type: T = Team (team => team....
Definition: SQLiteConnOneToMany.cs:309
Task< T > ElementAtAsync(int index)
Returns the element at a given index
Definition: SQLiteAsync.cs:1326
CreateTablesResult()
Deafualt Constructor
Definition: CreateTablesResult.cs:49
List< T > TableAllToMany< T >(bool isRecursive=false)
Get ALL the All To Many data and the other columns from the database with the specified type,...
Definition: SQLiteConnOneToMany.cs:110
MaxLengthAttribute(int length)
Constructor
Definition: MaxLengthAttribute.cs:50
MatchReactions OnMatch
The Match option for the Foreign Key, see SQLite-Net documenation for more details.
Definition: ForeignKeyAttribute.cs:72
CreateTableResult
Enum to specify if the Table has to be:
Definition: CreateTableResult.cs:37
static string dbConnectionString
The connection string to the database.
Definition: DatabaseSettings.cs:38
int CreateIndex(string indexName, string tableName, string columnName, bool unique=false)
Creates an index for the specified table and column.
Definition: SQLiteConnection.cs:669
IDisposable Lock()
Lock the database to serialize access to it. To unlock it, call Dispose on the returned object.
Definition: SQLiteAsync.cs:1514
string FkColumnName
The name of the (parent) column, the Foreign Key column In most cases the Id
Definition: FKReference.cs:39
Task< int > DropTableAsync< T >()
Executes a "drop table" on the database. This is non-recoverable.
Definition: SQLiteAsync.cs:396
Task< T[]> ToArrayAsync()
Queries the database and returns the results as an array.
Definition: SQLiteAsync.cs:1302
List< T > TableOneToMany< T >(bool isRecursive=false)
Get ALL the One To Many data and the other columns from the database with the specified type,...
Definition: SQLiteConnOneToMany.cs:76
string SaveTransactionPoint()
Creates a savepoint in the database at the current point in the transaction timeline....
Definition: SQLiteConnection.cs:1268
The basic SQLiteConnection class from SQLite-Net, with added code.
Definition: ColumnInfo.cs:35
Task< List< T > > QueryScalarsAsync< T >(string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteAsync.cs:1114
string Name
Name of the index to create
Definition: IndexedAttribute.cs:44
string DatabasePath
Gets the database path used by this connection.
Definition: SQLiteAsync.cs:97
SQLiteCommand CreateCommand(string cmdText, params object[] ps)
Creates a new SQLiteCommand given the command text with arguments. Place a '?' in the command text fo...
Definition: SQLiteConnection.cs:788
override string ToString()
Override the string information to return the name
Definition: ColumnInfo.cs:68
FKReference FkRefLeft
The Foreign Key pointing to the Left Table, in the Reference Table, Middle Table
Definition: ManyToManyStructure.cs:24
int Order
Ordeing of the index
Definition: IndexedAttribute.cs:50
SQLiteConnectionWithLock GetConnection()
Gets the pooled lockable connection used by this async connection. You should never need to use this....
Definition: SQLiteAsync.cs:206
int Update(object obj)
Updates all of the columns of a table using the specified object except for its primary key....
Definition: SQLiteConnection.cs:1837
int LibVersionNumber
Gets the SQLite library version number. 3007014 would be v3.7.14
Definition: SQLiteConnection.cs:79
Attribute for a column not null in the database
Definition: NotNullAttribute.cs:38
Attribute to set some table options
Definition: TableAttribute.cs:39
int DropTable< T >()
Executes a "drop table" on the database. This is non-recoverable.
Definition: SQLiteConnection.cs:432
SQLiteCommand(SQLiteConnection conn)
The connection with the full parced command and bindings
Definition: SQLiteCommand.cs:58
Column(PropertyInfo prop, CreateFlags createFlags=CreateFlags.None)
Constructor
Definition: TableMapping.cs:564
PKSort Sort
The sorting of the Primary Key
Definition: PrimaryKeyAttribute.cs:58
TableQuery< T > ThenByDescending< U >(Expression< Func< T, U >> orderExpr)
Order the query results according to a key.
Definition: TableQuery.cs:277
int InsertOrReplace(object obj, Type objType)
Inserts the given object (and updates its auto incremented primary key if it has one)....
Definition: SQLiteConnection.cs:1664
T[] ToArray()
Queries the database and returns the results as an array.
Definition: TableQuery.cs:785
SQLite-Net queries op one table, not recursive. The function will be converted and exected to a SQL c...
Definition: TableQuery.cs:42
PreparedSqlLiteInsertCommand(SQLiteConnection conn, string commandText)
Constructor
Definition: PreparedSqlLiteInsertCommand.cs:71
int CreateIndex(string indexName, string tableName, string[] columnNames, bool unique=false)
Creates an index for the specified table and columns.
Definition: SQLiteConnection.cs:655
Represents a parsed connection string.
Definition: SQLiteConnectionString.cs:37
SQLiteConnectionString(string databasePath, bool storeDateTimeAsTicks, object key=null, Action< SQLiteConnection > preKeyAction=null, Action< SQLiteConnection > postKeyAction=null, string vfsName=null)
Constructs a new SQLiteConnectionString with all the data needed to open an SQLiteConnection.
Definition: SQLiteConnectionString.cs:179
ColumnLeft LeftColumn
Left Column (data - object)
Definition: ManyToManyRefColumns.cs:25
Task< int > DeleteAsync< T >(object primaryKey)
Deletes the object with the specified primary key.
Definition: SQLiteAsync.cs:665
Exception, error results
Definition: SQLiteException.cs:37
string TableName
Name of the mapped Table
Definition: TableMapping.cs:55
Task< int > CountAsync(Expression< Func< T, bool >> predExpr)
Execute SELECT COUNT(*) on the query with an additional WHERE clause.
Definition: SQLiteAsync.cs:1318
object Key
Readonly, set by a constructor of the SQLConnection the encryption key to use on the database
Definition: SQLiteConnectionString.cs:88
Data structure for the Many to Many Reference Table this class is used to make columns with different...
Definition: ManyToManyRefColumns.cs:15
CreateTablesResult CreateTables< T, T2, T3, T4 >(CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database for each type. It also creates any specified ...
Definition: SQLiteConnection.cs:600
Task< int > CreateIndexAsync(string indexName, string tableName, string columnName, bool unique=false)
Creates an index for the specified table and column.
Definition: SQLiteAsync.cs:431
string DateTimeStringFormat
The format to use when storing DateTime properties as strings. Ignored if StoreDateTimeAsTicks is tru...
Definition: SQLiteAsync.cs:108
static new NotNullConstraintViolationException New(SQLite3.Result r, string message)
Constructor
Definition: NotNullConstraintViolationException.cs:83
NotNullConstraintViolationException(SQLite3.Result r, string message, TableMapping mapping, object obj)
Constructor
Definition: NotNullConstraintViolationException.cs:64
SQLiteConnectionString(string databasePath, bool storeDateTimeAsTicks=true)
Constructs a new SQLiteConnectionString with all the data needed to open an SQLiteConnection.
Definition: SQLiteConnectionString.cs:148
CreateTablesResult CreateTables< T, T2, T3, T4, T5 >(CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database for each type. It also creates any specified ...
Definition: SQLiteConnection.cs:618
void Commit()
Commits the transaction that was begun by BeginTransaction.
Definition: SQLiteConnection.cs:1422
Type ColumnType
Type of the column
Definition: TableMapping.cs:508
CreateTablesResult CreateTables< T, T2, T3 >(CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database for each type. It also creates any specified ...
Definition: SQLiteConnection.cs:583
Task< object > FindAsync(object pk, TableMapping map)
Attempts to retrieve an object with the given primary key from the table associated with the specifie...
Definition: SQLiteAsync.cs:821
virtual void Dispose(bool disposing)
Close action to dispose the connection
Definition: SQLiteConnection.cs:2142
void SetValue(object obj, object val)
Set the object value of the column - property
Definition: TableMapping.cs:606
Task< TableMapping > GetMappingAsync< T >(CreateFlags createFlags=CreateFlags.None)
Retrieves the mapping that is automatically generated for the given type.
Definition: SQLiteAsync.cs:913
static string SQLDeclAtrributes(TableMapping.Column p, string decl)
Transformation of c# Atrrribtues in SQL options like: Foreign keys options, Primary Keys options,...
Definition: SQLDeclExtent.cs:25
void RollbackTo(string savepoint)
Rolls back the savepoint created by BeginTransaction or SaveTransactionPoint.
Definition: SQLiteConnection.cs:1319
AsyncTableQuery< T > Table< T >()
Returns a queryable interface to the table represented by the given type.
Definition: SQLiteAsync.cs:1043
IEnumerable< TableMapping > TableMappings
Returns the mappings from types to tables that the connection currently understands.
Definition: SQLiteConnection.cs:341
the Column information
Definition: TableMapping.cs:474
EnumCacheInfo(Type type)
Constructor of the CacheInfo (Enum)
Definition: EnumCacheInfo.cs:49
override bool Unique
If the Attribute is used the value is always true.
Definition: UniqueAttribute.cs:22
Task< CreateTablesResult > CreateTablesAsync(CreateFlags createFlags=CreateFlags.None, params Type[] types)
Executes a "create table if not exists" on the database for each type. It also creates any specified ...
Definition: SQLiteAsync.cs:388
T FirstOrDefault()
Returns the first element of this query, or null if no element is found.
Definition: TableQuery.cs:802
bool StoreAsText
The values stored as text
Definition: EnumCacheInfo.cs:80
Type FkLeftType
The type of the Left Table - the type of the List<T> or Array[] in the Right Table
Definition: ManyToManyStructure.cs:36
string Name
Name of the Column
Definition: ColumnInfo.cs:49
CreateTableResult CreateTable(Type ty, CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database. It also creates any specified indexes on the...
Definition: SQLiteConnection.cs:474
virtual bool Unique
setting the index to a unique value
Definition: IndexedAttribute.cs:56
Task< int > DeleteAllAsync(TableMapping map)
Deletes all the objects from the specified table. WARNING WARNING: Let me repeat. It deletes ALL the ...
Definition: SQLiteAsync.cs:714
Unique attribute to set the column value to unique And adds a index to this Column
Definition: UniqueAttribute.cs:15
Task< object > FindWithQueryAsync(TableMapping map, string query, params object[] args)
Attempts to retrieve the first object that matches the query from the table associated with the speci...
Definition: SQLiteAsync.cs:880
T FindWithQuery< T >(string query, params object[] args)
Attempts to retrieve the first object that matches the query from the table associated with the speci...
Definition: SQLiteConnection.cs:1170
UniqueAttribute(Conflict conflict)
Cosntructor of teh attribute
Definition: UniqueAttribute.cs:34
IEnumerable< IndexedAttribute > Indices
The assigned IndexAttributes of the column
Definition: TableMapping.cs:539
Arguments for the Notification Event
Definition: NotifyTableChangedEventArgs.cs:37
static string username
The username to use to connect to the SQL database.
Definition: DatabaseSettings.cs:16
void SetAutoIncPK(object obj, long id)
Set the value of the local property AutoIncrementPk (_autoPK)
Definition: TableMapping.cs:404
void Release(string savepoint)
Releases a savepoint returned from SaveTransactionPoint. Releasing a savepoint makes changes since th...
Definition: SQLiteConnection.cs:1364
Type FkRightType
The Foreign Key pointing to the Right Table, in the Reference Table, Middle Table
Definition: ManyToManyStructure.cs:30
ManyToManyRefColumns(ColumnLeft leftColumn, ColumnRight rightColum)
Constructor of ManyToManyRefColumns
Definition: ManyToManyRefColumns.cs:32
Task< T > FirstOrDefaultAsync()
Returns the first element of this query, or null if no element is found.
Definition: SQLiteAsync.cs:1342
Task< int > CreateIndexAsync(string tableName, string[] columnNames, bool unique=false)
Creates an index for the specified table and columns.
Definition: SQLiteAsync.cs:442
void ResetValues()
Reset All the values of the column, Added for multiple records editing, and foreignKeys
Definition: TableMapping.cs:441
Column[] InsertColumns
Public array of all columns for the Insert, that are all columns expect the AutoInc assign column
Definition: TableMapping.cs:418
void Dispose()
Dispose the connection
Definition: SQLiteConnection.cs:2125
The unique attribute, for columns in the table scheme.
Definition: UniqueAttribute.cs:14
static NotNullConstraintViolationException New(SQLite3.Result r, string message, TableMapping mapping, object obj)
Constructor
Definition: NotNullConstraintViolationException.cs:98
string Name
The name of the table, when different then object name
Definition: TableAttribute.cs:45
CreateTablesResult CreateTables< T, T2 >(CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database for each type. It also creates any specified ...
Definition: SQLiteConnection.cs:567
Dictionary< Type, CreateTableResult > Results
The dictonary for the results
Definition: CreateTablesResult.cs:44
int DeleteAll< T >()
Deletes all the objects from the specified table. WARNING WARNING: Let me repeat. It deletes ALL the ...
Definition: SQLiteConnection.cs:2046
string DateTimeStringFormat
The format to use when storing DateTime properties as strings. Ignored if StoreDateTimeAsTicks is tru...
Definition: SQLiteConnection.cs:112
IEnumerator< T > GetEnumerator()
Get a IEnumerator from the Database, used SQLiteConnection
Definition: TableQuery.cs:756
string ColumnName
Column name
Definition: BaseTableQuery.cs:46
Attribute to Preserve the connection.
Definition: PreserveAttribute.cs:35
AsyncTableQuery< T > Take(int n)
Yields a given number of elements from the query and then skips the remainder.
Definition: SQLiteAsync.cs:1254
PrimaryKeyAttribute()
PrimaryKeyAttribute has more options,
Definition: PrimaryKeyAttribute.cs:24
NotNullConstraintViolationException(SQLite3.Result r, string message)
Constructor
Definition: NotNullConstraintViolationException.cs:51
int DropTable(TableMapping map)
Executes a "drop table" on the database. This is non-recoverable.
Definition: SQLiteConnection.cs:443
bool IsNullable
It's permitted to set the value to null
Definition: TableMapping.cs:545
SQLiteAsyncConnection(string databasePath, bool storeDateTimeAsTicks=true)
Constructs a new SQLiteAsyncConnection and opens a pooled SQLite database specified by databasePath.
Definition: SQLiteAsync.cs:54
NotifyTableChangedAction Action
The action on the notification
Definition: NotifyTableChangedEventArgs.cs:49
TableQuery< T > Table< T >()
Returns a queryable interface to the table represented by the given type.
Definition: SQLiteConnection.cs:1042
SQLite3.Result Result
the result of the expection
Definition: SQLiteException.cs:43
Task< TableMapping > GetMappingAsync(Type type, CreateFlags createFlags=CreateFlags.None)
Retrieves the mapping that is automatically generated for the given type.
Definition: SQLiteAsync.cs:898
string Name
Name of the column in the table, can be different than the object name
Definition: ColumnAttribute.cs:45
Task< T > FirstAsync()
Returns the first element of this query.
Definition: SQLiteAsync.cs:1334
string DatabasePath
Gets the database path used by this connection.
Definition: SQLiteConnection.cs:74
object Find(object pk, TableMapping map)
Attempts to retrieve an object with the given primary key from the table associated with the specifie...
Definition: SQLiteConnection.cs:1135
int CreateIndex< T >(Expression< Func< T, object >> property, bool unique=false)
Creates an index for the specified object property. e.g. CreateIndex<Client>(c => c....
Definition: SQLiteConnection.cs:703
SQLiteConnection(string databasePath, bool storeDateTimeAsTicks=true)
Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath.
Definition: SQLiteConnection.cs:141
int InsertAll(System.Collections.IEnumerable objects, Type objType, bool runInTransaction=true)
Inserts all specified objects.
Definition: SQLiteConnection.cs:1562
override string ToString()
overriding the .Tostring() for the complete CommandText
Definition: SQLiteCommand.cs:301
List< string > TableOrder
The order of the tables we need to follow, otherwise some upserts /inserts /updates gives a error whe...
Definition: SQLiteConnExtended.cs:86
Task< int > DeleteAsync(object objectToDelete)
Deletes the given object from the database using its primary key.
Definition: SQLiteAsync.cs:648
Task RunInTransactionAsync(Action< SQLiteConnection > action)
Executes action within a (possibly nested) transaction by wrapping it in a SAVEPOINT....
Definition: SQLiteAsync.cs:1017
Task< int > CreateIndexAsync(string tableName, string columnName, bool unique=false)
Creates an index for the specified table and column.
Definition: SQLiteAsync.cs:419
int WriteManyToManyRefTable(object obj)
Write - Insert into the reference table(s) of the Many to Many relation(s) in the database from one o...
Definition: SQLiteConnExtended.cs:223
int UpSert(object obj)
Inserts or Updates (UpSert) the given object The lib version should be at least 3....
Definition: SQLiteConnUpsert.cs:107
int UpdateAll(System.Collections.IEnumerable objects, bool runInTransaction=true)
Updates all specified objects.
Definition: SQLiteConnection.cs:1926
@ AutoIncPK
Force the primary key property to be auto incrementing. This avoids the need for the [AutoIncrement] ...
Task SetBusyTimeoutAsync(TimeSpan value)
Sets the amount of time to wait for a table to become unlocked.
Definition: SQLiteAsync.cs:121
TimeSpan BusyTimeout
Sets a busy handler to sleep the specified amount of time when a table is locked. The handler will sl...
Definition: SQLiteConnection.cs:312
object FindWithQuery(TableMapping map, string query, params object[] args)
Attempts to retrieve the first object that matches the query from the table associated with the speci...
Definition: SQLiteConnection.cs:1192
string CommandText
The SQL_Net CommandText
Definition: SQLiteCommand.cs:52
Column PK
The Primary Key column
Definition: TableMapping.cs:75
The basic TableMapping class from SQLite-Net, with added code
Definition: TableMapping.cs:43
static SQLiteException New(SQLite3.Result r, string message)
Constructor
Definition: SQLiteException.cs:66
CreateTableResult CreateTable< T >(CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database. It also creates any specified indexes on the...
Definition: SQLiteConnection.cs:458
Type FkTableType
The type of the (parent) table, the Foreign Key table
Definition: FKReference.cs:33
Column information on the connection to determine the migration option(s)
Definition: ColumnInfo.cs:41
bool StoreTimeSpanAsTicks
Whether to store TimeSpan properties as ticks (true) or strings (false).
Definition: SQLiteAsync.cs:152
The ForeignKeys references with the foreignKey attributes with are set on the objects
Definition: FKReference.cs:17
Attribute for the autoincremnet option in the Database / Table / Column
Definition: AutoIncrementAttribute.cs:38
Task< T > FindAsync< T >(object pk)
Attempts to retrieve an object with the given primary key from the table associated with the specifie...
Definition: SQLiteAsync.cs:800
Action< string > Tracer
The delegate responsible for writing trace lines.
Definition: SQLiteConnection.cs:96
Attribute to specify another name to the column
Definition: ColumnAttribute.cs:39
Select the collating sequence to use on a column. "BINARY", "NOCASE", and "RTRIM" are supported....
Definition: CollationAttribute.cs:40
IEnumerable< T > DeferredQuery< T >(string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteConnection.cs:974
Task< int > InsertAsync(object obj, Type objType)
Inserts the given object (and updates its auto incremented primary key if it has one)....
Definition: SQLiteAsync.cs:500
virtual void OnInstanceCreated(object obj)
Invoked every time an instance is loaded from the database.
Definition: SQLiteCommand.cs:151
SQLiteException(SQLite3.Result r, string message)
Constructor
Definition: SQLiteException.cs:53
SQLiteConnection(string databasePath, SQLiteOpenFlags openFlags, bool storeDateTimeAsTicks=true)
Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath.
Definition: SQLiteConnection.cs:163
T Find< T >(object pk)
Attempts to retrieve an object with the given primary key from the table associated with the specifie...
Definition: SQLiteConnection.cs:1114
string UniqueKey
Readonly, set by a constructor of the SQLConnectionString The unique encryption key
Definition: SQLiteConnectionString.cs:46
Task< IEnumerable< T > > DeferredQueryAsync< T >(string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteAsync.cs:1161
int Execute(string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteConnection.cs:846
PropertyInfo PropertyInfo
the property information
Definition: TableMapping.cs:490
List< T > ExecuteQuery< T >()
Query items of type, the TableMapping will be fetched according the type
Definition: SQLiteCommand.cs:122
SQLiteAsyncConnection(SQLiteConnectionString connectionString)
Constructs a new SQLiteAsyncConnection and opens a pooled SQLite database using the given connection ...
Definition: SQLiteAsync.cs:89
int WriteManyToManyRefTable(object obj, Type objType, ManyToManyStructure mtm)
Write - Insert into the reference table of the Many to Many relation in the database from one object....
Definition: SQLiteConnExtended.cs:255
RelatedType
Enum for the releated type of the Foreign Key
Definition: RelatedType.cs:13
int CleanManyToManyRefTable(Type type)
Remove the orphant entries in the reference table of the Many To Many realtion. That means it will lo...
Definition: SQLiteConnExtended.cs:340
int Update(object obj, Type objType)
Updates the columns of the object in a table using the specified object. Except for its primary key....
Definition: SQLiteConnection.cs:1860
void ResetAllValues()
Reset all the values of the columns rows Added for the foreignKey / multiple records editing
Definition: SQLiteConnection.cs:328
Task< CreateTablesResult > CreateTablesAsync< T, T2, T3 >(CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database for each type. It also creates any specified ...
Definition: SQLiteAsync.cs:334
int Insert(object obj, Type objType)
Inserts the given object (and updates its auto incremented primary key if it has one)....
Definition: SQLiteConnection.cs:1642
List< object > Query(TableMapping map, string query, params object[] args)
Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?' in the command text ...
Definition: SQLiteConnection.cs:1000
string DataColumnName
The column in the parent table which holds the data in a List<> or Array[]
Definition: FKReference.cs:44
bool IsAutoGuid
True - column get a GUID automatic set by SQL-Net
Definition: TableMapping.cs:527
List< T > QueryMtM< T >(string query, params object[] args)
A Query of a SQL command, method is needed for the ManyToMany method Query as defined SQLConnction ba...
Definition: SQLiteConnManyToMany.cs:205
Task< CreateTableResult > CreateTableAsync< T >(CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database. It also creates any specified indexes on the...
Definition: SQLiteAsync.cs:287
Task EnableWriteAheadLoggingAsync()
Enables the write ahead logging. WAL is significantly faster in most scenarios by providing better co...
Definition: SQLiteAsync.cs:135
TableQuery< U > Clone< U >()
Filters the query based on a predicate.
Definition: TableQuery.cs:127
Abstract class for Ordering on columnName
Definition: BaseTableQuery.cs:35
TableMapping GetMapping(Type type, CreateFlags createFlags=CreateFlags.None, object obj=null, SQLiteConnection conn=null)
Retrieves the mapping that is automatically generated for the given type. Modified by Pi-Con
Definition: SQLiteConnection.cs:367
string ColumnName
The column on which the Foreign Key attribute is placed in the (child) table
Definition: FKReference.cs:28
The results in a Dictionary of multiple table creations
Definition: CreateTablesResult.cs:38
bool HasAutoIncPK
True - the column has a Autoincrementing Primary Key ///
Definition: TableMapping.cs:397
int LibVersionNumber
Gets the SQLite library version number. 3007014 would be v3.7.14
Definition: SQLiteAsync.cs:102
int Delete(object primaryKey, TableMapping map)
Deletes the object with the specified primary key.
Definition: SQLiteConnection.cs:2002
string Value
the type of collating
Definition: CollationAttribute.cs:46
static string server
The URL (IP of FilePath) where the database is stored.
Definition: DatabaseSettings.cs:26
T First(Expression< Func< T, bool >> predExpr)
Returns the first element of this query that matches the predicate.
Definition: TableQuery.cs:811
List< Object > LookForObject(Object obj, ManyToManyStructure mtm)
Look for all objects (cloumns) we need for the Many to Many Foreign Key operations Function is "almos...
Definition: SQLiteConnExtended.cs:115
SQLiteConnectionWithLock(SQLiteConnectionString connectionString)
Initializes a new instance of the T:SQLite.SQLiteConnectionWithLock class.
Definition: SQLiteAsync.cs:1498
Task< int > InsertAsync(object obj, string extra)
Inserts the given object (and updates its auto incremented primary key if it has one)....
Definition: SQLiteAsync.cs:519
List< T > ToList()
Queries the database and returns the results as a List.
Definition: TableQuery.cs:777
SQLiteConnection Connection
the connection to the database we use
Definition: TableQuery.cs:48
FKReference FkRefRight
The type of the Right Table - the type of the List<T> or Array[] in the Left Table
Definition: ManyToManyStructure.cs:18
void Close()
Close action to dispose the connection
Definition: SQLiteConnection.cs:2134
FKReference(Type tableType, Type fkTableType, string dataColumnName)
Constructor for FKReferences
Definition: FKReference.cs:77
bool StoreDateTimeAsTicks
Whether to store DateTime properties as ticks (true) or strings (false).
Definition: SQLiteConnection.cs:101
static SQLiteConnectionPool Shared
Gets the singleton instance of the connection tool.
Definition: SQLiteAsync.cs:1422
Task< CreateTablesResult > CreateTablesAsync< T, T2 >(CreateFlags createFlags=CreateFlags.None)
Executes a "create table if not exists" on the database for each type. It also creates any specified ...
Definition: SQLiteAsync.cs:318
Query to an asynchronous database connection.
Definition: SQLiteAsync.cs:1198
int InsertAll(System.Collections.IEnumerable objects, string extra, bool runInTransaction=true)
Inserts all specified objects.
Definition: SQLiteConnection.cs:1524
Task< int > UpdateAsync(object obj)
Updates all of the columns of a table using the specified object except for its primary key....
Definition: SQLiteAsync.cs:598
Task< int > DeleteAsync()
Delete all the rows that match this query.
Definition: SQLiteAsync.cs:1374
bool StoreDateTimeAsTicks
Definition: SQLiteConnectionString.cs:60
List< T > TableManyToMany< T >(bool isRecursive=false)
Get ALL the Many To Many data from the database with the specified type, only the fields marked as Ma...
Definition: SQLiteConnManyToMany.cs:60
Column[] Columns
The columns in the Object / Table
Definition: TableMapping.cs:69
Task< List< T > > ToListAsync()
Queries the database and returns the results as a List.
Definition: SQLiteAsync.cs:1294
Column FindColumn(string columnName)
Find the column with the name used in the database - table
Definition: TableMapping.cs:465
void Reset()
Closes all connections managed by this pool.
Definition: SQLiteAsync.cs:1469
Task< int > UpdateAllAsync(IEnumerable objects, bool runInTransaction=true)
Updates all specified objects.
Definition: SQLiteAsync.cs:634
int Delete(Expression< Func< T, bool >> predExpr)
Delete all the rows that match this query and the given predicate.
Definition: TableQuery.cs:179
@ FullTextSearch4
Create virtual table using FTS4
The basic PrimaryKeyAttribute class from SQLite-Net, with added code
Definition: PrimaryKeyAttribute.cs:17
Type RelatedManyData< T >(Object currentObject, bool isRecursive)
Get the related ManytoMany data for specified object, And the related data recursive if option is set...
Definition: SQLiteConnManyToMany.cs:222
bool TimeExecution
Whether Trace lines should be written that show the execution time of queries.
Definition: SQLiteAsync.cs:178
Conflict OnConflict
The conflict settings, see SQLite-Net documentation for more details
Definition: UniqueAttribute.cs:20
Task< int > CountAsync()
Execute SELECT COUNT(*) on the query
Definition: SQLiteAsync.cs:1310
RelatedType FkRelatedType
The type of relation between the tables
Definition: FKReference.cs:49
object GetValue(object obj)
Get the object value of the column - property
Definition: TableMapping.cs:622
int Insert(object obj, string extra)
Inserts the given object (and updates its auto incremented primary key if it has one)....
Definition: SQLiteConnection.cs:1683
Task EnableLoadExtensionAsync(bool enabled)
Enable or disable extension loading.
Definition: SQLiteAsync.cs:269
Task< T > GetAsync< T >(object pk)
Attempts to retrieve an object with the given primary key from the table associated with the specifie...
Definition: SQLiteAsync.cs:745
Conflict
The conflict settings for the On Update and On Delete options in ForeignKeys and for the Unique Attri...
Definition: Conflict.cs:14
Definition: DatabaseSettings.cs:5