コード例 #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));
 }