Exemplo n.º 1
0
 public static NotNullConstraintViolationException New(SQLiteException exception, TableMapping mapping,
                                                       object obj)
 {
     return(new NotNullConstraintViolationException(exception.Result, exception.Message, mapping, obj));
 }
Exemplo n.º 2
0
 protected NotNullConstraintViolationException(SQLite3.Result r, string message, TableMapping mapping,
                                               object obj) : base(r, message)
 {
     if (mapping != null && obj != null)
     {
         this.Columns = from c in mapping.Columns
                        where c.IsNullable == false && c.GetValue(obj) == null
                        select c;
     }
 }
Exemplo n.º 3
0
 public static NotNullConstraintViolationException New(SQLite3.Result r, string message, TableMapping mapping,
                                                       object obj)
 {
     return(new NotNullConstraintViolationException(r, message, mapping, obj));
 }
Exemplo n.º 4
0
 private TableQuery(SQLiteConnection conn, TableMapping table)
 {
     this.Connection = conn;
     this.Table      = table;
 }
Exemplo n.º 5
0
 public TableQuery(SQLiteConnection conn)
 {
     this.Connection = conn;
     this.Table      = this.Connection.GetMapping(typeof(T));
 }
Exemplo n.º 6
0
 public List <T> ExecuteQuery <T>(TableMapping map)
 {
     return(ExecuteDeferredQuery <T>(map).ToList());
 }
Exemplo n.º 7
0
 public object Find(object pk, TableMapping map)
 {
     return(Query(map, map.GetByPrimaryKeySQL, pk).FirstOrDefault());
 }
Exemplo n.º 8
0
        public T Find <T>(object pk) where T : new()
        {
            TableMapping map = GetMapping(typeof(T));

            return(Query <T>(map.GetByPrimaryKeySQL, pk).FirstOrDefault());
        }
Exemplo n.º 9
0
        public IEnumerable <object> DeferredQuery(TableMapping map, string query, params object[] args)
        {
            SQLiteCommand cmd = CreateCommand(query, args);

            return(cmd.ExecuteDeferredQuery <object>(map));
        }
Exemplo n.º 10
0
        public List <object> Query(TableMapping map, string query, params object[] args)
        {
            SQLiteCommand cmd = CreateCommand(query, args);

            return(cmd.ExecuteQuery <object>(map));
        }