예제 #1
0
 public void SetValue(DatabaseTableField field, object value)
 {
     if (field.GetTable() == table)
     {
         values[field] = field.TransformToInternal(value);
     }
 }
예제 #2
0
        public object GetValue(DatabaseTableField field)
        {
            if (field.GetTable() == table)
            {
                return(field.TransformFromInternal(values.GetValue(field)));
            }

            return(null);
        }
예제 #3
0
        public DatabaseTableField AddField(DatabaseTableField to_add)
        {
            fields.Add(to_add.GetName(), to_add);
            to_add.Initialize(this);

            if (to_add.IsPrimaryKey())
            {
                primary_field = to_add;
            }

            return(to_add);
        }
예제 #4
0
        public DatabaseTableRowStream(DatabaseTableRow r, DatabaseTableField f, bool read, bool write)
        {
            can_read  = read;
            can_write = write;

            row   = r;
            field = f;

            if (can_read)
            {
                memory_stream = row.GetValue <byte[]>(field).GetMemoryStream();
            }
            else
            {
                memory_stream = new MemoryStream();
            }

            Initialize(memory_stream);
        }
예제 #5
0
 public T GetValue <T>(DatabaseTableField field)
 {
     return(GetValue(field).Convert <T>());
 }
예제 #6
0
 public DatabaseTableExpression_Field(DatabaseTableField f)
 {
     field = f;
 }
예제 #7
0
 static public DatabaseTableExpression ContainsExpression(this DatabaseTableField item, DatabaseTableExpression expression)
 {
     return(item.GetExpression().ContainsExpression(expression));
 }
예제 #8
0
 static public DatabaseTableExpression NotEqualsExpression(this DatabaseTableField item, DatabaseTableExpression expression)
 {
     return(item.GetExpression().NotEqualsExpression(expression));
 }
예제 #9
0
 static public Stream GetWriteStream(this DatabaseTableRow item, DatabaseTableField field)
 {
     return(new DatabaseTableRowStream(item, field, false, true));
 }