コード例 #1
0
ファイル: FunctionResultTable.cs プロジェクト: ikvm/deveelsql
        public SqlObject GetValue(int columnOffset, RowId rowid)
        {
            if (rowid.ToInt64() != 0)
                throw new ArgumentOutOfRangeException("rowid");

            return values[columnOffset];
        }
コード例 #2
0
ファイル: FunctionResultTable.cs プロジェクト: ikvm/deveelsql
        public TableRow GetRow(RowId rowid)
        {
            if (rowid.ToInt64() != 0)
                throw new ArgumentOutOfRangeException("rowid");

            if (row == null) {
                row = new TableRow(this, new RowId(0));
                for (int i = 0; i < columns.Count; i++)
                    row.SetValue(i, values[i]);
            }

            return row;
        }
コード例 #3
0
ファイル: JoinedTableBase.cs プロジェクト: ikvm/deveelsql
        public TableRow GetRow(RowId rowid)
        {
            // Null value if the rowid is less than 0
            if (rowid == null || rowid.ToInt64() < 0)
                return null;

            int sz = Columns.Count;
            TableRow row = new TableRow(this, rowid);
            for (int i = 0; i < sz; i++) {
                int tableIndex = columns.IndexOfTable(i);
                // Adjust the column to the table the column is located
                int tableColumn = columns.AdjustColumn(i);
                // Adjust the row by the table
                RowId tableRow = AdjustRow(rowid.ToInt64(), tableIndex);

                // Fetch and return the data
                SqlObject value = tables[tableIndex].GetValue(tableColumn, tableRow);

                TableColumn column = Columns[i];
                row.SetValue(column.Offset, value);
            }

            return row;
        }
コード例 #4
0
ファイル: FunctionResultTable.cs プロジェクト: ikvm/deveelsql
 public bool RowExists(RowId rowid)
 {
     return rowid.ToInt64() == 0;
 }
コード例 #5
0
            public TableRow GetRow(RowId rowid)
            {
                if (rowid.ToInt64() != 0)
                    return null;

                return currentRow;
            }
コード例 #6
0
            public void Delete(RowId rowid)
            {
                if (rowid.ToInt64() != 0)
                    throw new ArgumentException();

                queryString = null;
                parameters.Clear();
                currentRow = null;
                rowCount--;
            }
コード例 #7
0
ファイル: JoinedTableBase.cs プロジェクト: ikvm/deveelsql
        public SqlObject GetValue(int columnOffset, RowId rowid)
        {
            int tableIndex = columns.IndexOfTable(columnOffset);
            // Adjust the column to the table the column is located
            int tableColumn = columns.AdjustColumn(columnOffset);
            // Adjust the row by the table
            RowId tableRow = AdjustRow(rowid.ToInt64(), tableIndex);

            // Fetch and return the data
            return tables[tableIndex].GetValue(tableColumn, tableRow);
        }
コード例 #8
0
ファイル: JoinedTableBase.cs プロジェクト: ikvm/deveelsql
 public bool RowExists(RowId rowid)
 {
     return rowid.ToInt64() > 0 && rowid.ToInt64() < RowCount;
 }
コード例 #9
0
ファイル: JoinedTableBase.cs プロジェクト: ikvm/deveelsql
        public void PrefetchValue(int columnOffset, RowId rowid)
        {
            if (rowid == null || rowid.ToInt64() < 0)
                return;

            if (columnOffset == -1) {
                for (int i = 0; i < tables.Length; ++i) {
                    tables[i].PrefetchValue(-1, AdjustRow(rowid.ToInt64(), i));
                }
            } else {
                int tableIndex = columns.IndexOfTable(columnOffset);
                // Adjust the column to the table the column is located
                int tableColumn = columns.AdjustColumn(columnOffset);
                // Adjust the row by the table
                RowId tableRow = AdjustRow(rowid.ToInt64(), tableIndex);

                // Delegate the hint to the parent table
                tables[tableIndex].PrefetchValue(tableColumn, tableRow);
            }
        }