Exemple #1
0
        internal Table(Command command, TableMD tableMetadata, int tableId)
        {
            m_tableMetadata = tableMetadata;
            m_columns = Command.CreateVarList();
            m_keys = command.CreateVarVec();
            m_nonnullableColumns = command.CreateVarVec();
            m_tableId = tableId;

            var columnVarMap = new Dictionary<string, ColumnVar>();
            foreach (var c in tableMetadata.Columns)
            {
                var v = command.CreateColumnVar(this, c);
                columnVarMap[c.Name] = v;
                if (!c.IsNullable)
                {
                    m_nonnullableColumns.Set(v);
                }
            }

            foreach (var c in tableMetadata.Keys)
            {
                var v = columnVarMap[c.Name];
                m_keys.Set(v);
            }

            m_referencedColumns = command.CreateVarVec(m_columns);
        }
Exemple #2
0
        internal Table(Command command, TableMD tableMetadata, int tableId)
        {
            m_tableMetadata      = tableMetadata;
            m_columns            = Command.CreateVarList();
            m_keys               = command.CreateVarVec();
            m_nonnullableColumns = command.CreateVarVec();
            m_tableId            = tableId;

            Dictionary <string, ColumnVar> columnVarMap = new Dictionary <string, ColumnVar>();

            foreach (ColumnMD c in tableMetadata.Columns)
            {
                ColumnVar v = command.CreateColumnVar(this, c);
                columnVarMap[c.Name] = v;
                if (!c.IsNullable)
                {
                    m_nonnullableColumns.Set(v);
                }
            }

            foreach (ColumnMD c in tableMetadata.Keys)
            {
                ColumnVar v = columnVarMap[c.Name];
                m_keys.Set(v);
            }

            m_referencedColumns = command.CreateVarVec(m_columns);
        }
 /// <summary>
 /// More useful default constructor
 /// </summary>
 /// <param name="table">table containing this column</param>
 /// <param name="property">property describing this column</param>
 internal ColumnMD(TableMD table, EdmMember property)
     : this(table, property.Name, property.TypeUsage)
 {
     m_property = property;
 }
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="table">Table containing this column</param>
 /// <param name="name">Column name</param>
 /// <param name="type">Datatype of the column</param>
 internal ColumnMD(TableMD table, string name, TypeUsage type)
 {
     m_name = name;
     m_type = type;
 }
Exemple #5
0
 /// <summary>
 /// More useful default constructor
 /// </summary>
 /// <param name="table">table containing this column</param>
 /// <param name="property">property describing this column</param>
 internal ColumnMD(TableMD table, EdmMember property)
     : this(table, property.Name, property.TypeUsage)
 {
     m_property = property;
 }
Exemple #6
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="table">Table containing this column</param>
 /// <param name="name">Column name</param>
 /// <param name="type">Datatype of the column</param>
 internal ColumnMD(TableMD table, string name, TypeUsage type)
 {
     m_name = name;
     m_type = type;
 }
Exemple #7
0
 /// <summary>
 /// Creates a new table instance
 /// </summary>
 /// <param name="tableMetadata">table metadata</param>
 /// <returns>A new Table instance with columns as defined in the specified metadata</returns>
 internal Table CreateTableInstance(TableMD tableMetadata)
 {
     Table t = new Table(this, tableMetadata, NewTableId());
     m_tables.Add(t);
     return t;
 }
Exemple #8
0
 /// <summary>
 /// Creates an instance of a ScanViewOp
 /// </summary>
 /// <param name="tableMetadata">the table metadata</param>
 /// <returns>a new ScanViewOp</returns>
 internal ScanViewOp CreateScanViewOp(TableMD tableMetadata)
 {
     Table table = this.CreateTableInstance(tableMetadata);
     return this.CreateScanViewOp(table);
 }
 /// <summary>
 /// Creates an instance of a ScanViewOp
 /// </summary>
 /// <param name="tableMetadata">the table metadata</param>
 /// <returns>a new ScanViewOp</returns>
 internal virtual ScanViewOp CreateScanViewOp(TableMD tableMetadata)
 {
     var table = CreateTableInstance(tableMetadata);
     return CreateScanViewOp(table);
 }