aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm')
-rw-r--r--core/vm/sqlvm/schema/schema.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/core/vm/sqlvm/schema/schema.go b/core/vm/sqlvm/schema/schema.go
index 7bbe9518e..e3e695663 100644
--- a/core/vm/sqlvm/schema/schema.go
+++ b/core/vm/sqlvm/schema/schema.go
@@ -71,6 +71,9 @@ type IndexRef uint8
// SequenceRef defines the type for sequence index in Table.
type SequenceRef uint8
+// SelectColumnRef defines the type for column index in SelectStmtNode.Column.
+type SelectColumnRef uint16
+
// IndexAttr defines bit flags for describing index attribute.
type IndexAttr uint16
@@ -198,3 +201,26 @@ func (c *Column) DecodeRLP(s *rlp.Stream) error {
return nil
}
+
+// TableDescriptor identifies a table in a schema by an array index.
+type TableDescriptor struct {
+ Table TableRef
+}
+
+// ColumnDescriptor identifies a column in a schema by array indices.
+type ColumnDescriptor struct {
+ Table TableRef
+ Column ColumnRef
+}
+
+// IndexDescriptor identifies a index in a schema by array indices.
+type IndexDescriptor struct {
+ Table TableRef
+ Index IndexRef
+}
+
+// SelectColumnDescriptor identifies a column specified in a select command by
+// an array index.
+type SelectColumnDescriptor struct {
+ SelectColumn SelectColumnRef
+}