Ejemplo n.º 1
0
 public static NotNullConstraintViolationException New(SQLiteException exception, TableMapping mapping,
                                                       object obj)
 {
     return(new NotNullConstraintViolationException(exception.Result, exception.Message, mapping, obj));
 }
Ejemplo 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;
     }
 }
Ejemplo n.º 3
0
 public static NotNullConstraintViolationException New(SQLite3.Result r, string message, TableMapping mapping,
                                                       object obj)
 {
     return(new NotNullConstraintViolationException(r, message, mapping, obj));
 }
Ejemplo n.º 4
0
 private TableQuery(SQLiteConnection conn, TableMapping table)
 {
     this.Connection = conn;
     this.Table      = table;
 }
Ejemplo n.º 5
0
 public TableQuery(SQLiteConnection conn)
 {
     this.Connection = conn;
     this.Table      = this.Connection.GetMapping(typeof(T));
 }
Ejemplo n.º 6
0
 public List <T> ExecuteQuery <T>(TableMapping map)
 {
     return(ExecuteDeferredQuery <T>(map).ToList());
 }
Ejemplo n.º 7
0
 public object Find(object pk, TableMapping map)
 {
     return(Query(map, map.GetByPrimaryKeySQL, pk).FirstOrDefault());
 }
Ejemplo n.º 8
0
        public T Find <T>(object pk) where T : new()
        {
            TableMapping map = GetMapping(typeof(T));

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

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

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