Пример #1
0
 public void InsertRow(string tableName, string columnNames, string values)
 {
     if (UnderlayingDatabase == null)
     {
         throw new InvalidOperationException("The Database is not created.");
     }
     UnderlayingDatabase.ExecSQL($"INSERT INTO {tableName} ({columnNames}) VALUES ({values});");
 }
Пример #2
0
 public void CreateTable(string tableName, string tableMap)
 {
     if (UnderlayingDatabase == null)
     {
         throw new InvalidOperationException("The Database is not created.");
     }
     UnderlayingDatabase.ExecSQL($"CREATE TABLE {tableName}({tableMap});");
 }
Пример #3
0
 public SQLiteCursor GetItem(string tableName, string command, string predicate = "")
 {
     if (UnderlayingDatabase == null)
     {
         throw new InvalidOperationException("The Database is not created.");
     }
     return((SQLiteCursor)UnderlayingDatabase.RawQuery($"SELECT {command} FROM {tableName}"
                                                       + predicate == string.Empty ? ";" : ($" WHERE {predicate};"), null));
 }