A base class for methods needed by all SQLite database classes
More...
A base class for methods needed by all SQLite database classes
Definition at line 41 of file SQLiteUtils.cs.
static void OpenSim.Data.SQLite.SQLiteUtil.createCol |
( |
DataTable |
dt, |
|
|
string |
name, |
|
|
Type |
type |
|
) |
| |
|
inlinestatic |
static SqliteCommand OpenSim.Data.SQLite.SQLiteUtil.createInsertCommand |
( |
string |
table, |
|
|
DataTable |
dt |
|
) |
| |
|
inlinestatic |
Create an insert command
- Parameters
-
table | table name |
dt | data table |
- Returns
- the created command
This is subtle enough to deserve some commentary. Instead of doing lots and *lots of hardcoded strings for database definitions we'll use the fact that realistically all insert statements look like "insert into A(b, c) values(:b, :c) on the parameterized query front. If we just have a list of b, c, etc... we can generate these strings instead of typing them out.
Definition at line 88 of file SQLiteUtils.cs.
static SqliteParameter OpenSim.Data.SQLite.SQLiteUtil.createSqliteParameter |
( |
string |
name, |
|
|
Type |
type |
|
) |
| |
|
inlinestatic |
This is a convenience function that collapses 5 repetitive lines for defining SqliteParameters to 2 parameters: column name and database type.
It assumes certain conventions like :param as the param name to replace in parametrized queries, and that source version is always current version, both of which are fine for us.
/summary>
- Parameters
-
returns>a built sqlite parameter
Definition at line 205 of file SQLiteUtils.cs.
static SqliteCommand OpenSim.Data.SQLite.SQLiteUtil.createUpdateCommand |
( |
string |
table, |
|
|
string |
pk, |
|
|
DataTable |
dt |
|
) |
| |
|
inlinestatic |
create an update command
- Parameters
-
- Returns
- the created command
Definition at line 122 of file SQLiteUtils.cs.
static DbType OpenSim.Data.SQLite.SQLiteUtil.dbtypeFromType |
( |
Type |
type | ) |
|
|
inlinestatic |
Type conversion function
- Parameters
-
- Returns
- a DbType
Definition at line 226 of file SQLiteUtils.cs.
static string OpenSim.Data.SQLite.SQLiteUtil.defineTable |
( |
DataTable |
dt | ) |
|
|
inlinestatic |
static string OpenSim.Data.SQLite.SQLiteUtil.sqliteType |
( |
Type |
type | ) |
|
|
inlinestatic |
- Parameters
-
- Returns
- a string
this is something we'll need to implement for each db slightly differently.
Definition at line 271 of file SQLiteUtils.cs.
The documentation for this class was generated from the following file: