lib/rasti/db/nql/syntax.rb in rasti-db-2.0.1 vs lib/rasti/db/nql/syntax.rb in rasti-db-2.1.0
- old
+ new
@@ -431,31 +431,31 @@
node_cache[:comparison][start_index] = r0
r0
end
- module Field0
+ module Attribute0
def table
elements[0]
end
end
- module Field1
+ module Attribute1
def _tables
elements[0]
end
def _column
elements[1]
end
end
- def _nt_field
+ def _nt_attribute
start_index = index
- if node_cache[:field].has_key?(index)
- cached = node_cache[:field][index]
+ if node_cache[:attribute].has_key?(index)
+ cached = node_cache[:attribute][index]
if cached
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
@index = cached.interval.end
end
return cached
@@ -463,11 +463,11 @@
i0, s0 = index, []
s1, i1 = [], index
loop do
i2, s2 = index, []
- r3 = _nt_field_name
+ r3 = _nt_attribute_name
s2 << r3
if r3
if has_terminal?('.', false, index)
r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
@index += 1
@@ -477,11 +477,11 @@
end
s2 << r4
end
if s2.last
r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
- r2.extend(Field0)
+ r2.extend(Attribute0)
else
@index = i2
r2 = nil
end
if r2
@@ -491,28 +491,28 @@
end
end
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
s0 << r1
if r1
- r5 = _nt_field_name
+ r5 = _nt_attribute_name
s0 << r5
end
if s0.last
- r0 = instantiate_node(Nodes::Field,input, i0...index, s0)
- r0.extend(Field1)
+ r0 = instantiate_node(Nodes::Attribute,input, i0...index, s0)
+ r0.extend(Attribute1)
else
@index = i0
r0 = nil
end
- node_cache[:field][start_index] = r0
+ node_cache[:attribute][start_index] = r0
r0
end
module ComparisonInclude0
- def field
+ def attribute
elements[0]
end
def comparator
elements[2]
@@ -533,11 +533,11 @@
end
return cached
end
i0, s0 = index, []
- r1 = _nt_field
+ r1 = _nt_attribute
s0 << r1
if r1
s2, i2 = [], index
loop do
r3 = _nt_space
@@ -589,11 +589,11 @@
r0
end
module ComparisonNotInclude0
- def field
+ def attribute
elements[0]
end
def comparator
elements[2]
@@ -614,11 +614,11 @@
end
return cached
end
i0, s0 = index, []
- r1 = _nt_field
+ r1 = _nt_attribute
s0 << r1
if r1
s2, i2 = [], index
loop do
r3 = _nt_space
@@ -670,11 +670,11 @@
r0
end
module ComparisonLike0
- def field
+ def attribute
elements[0]
end
def comparator
elements[2]
@@ -695,11 +695,11 @@
end
return cached
end
i0, s0 = index, []
- r1 = _nt_field
+ r1 = _nt_attribute
s0 << r1
if r1
s2, i2 = [], index
loop do
r3 = _nt_space
@@ -751,11 +751,11 @@
r0
end
module ComparisonGreaterThan0
- def field
+ def attribute
elements[0]
end
def comparator
elements[2]
@@ -776,11 +776,11 @@
end
return cached
end
i0, s0 = index, []
- r1 = _nt_field
+ r1 = _nt_attribute
s0 << r1
if r1
s2, i2 = [], index
loop do
r3 = _nt_space
@@ -832,11 +832,11 @@
r0
end
module ComparisonGreaterThanOrEqual0
- def field
+ def attribute
elements[0]
end
def comparator
elements[2]
@@ -857,11 +857,11 @@
end
return cached
end
i0, s0 = index, []
- r1 = _nt_field
+ r1 = _nt_attribute
s0 << r1
if r1
s2, i2 = [], index
loop do
r3 = _nt_space
@@ -913,11 +913,11 @@
r0
end
module ComparisonLessThan0
- def field
+ def attribute
elements[0]
end
def comparator
elements[2]
@@ -938,11 +938,11 @@
end
return cached
end
i0, s0 = index, []
- r1 = _nt_field
+ r1 = _nt_attribute
s0 << r1
if r1
s2, i2 = [], index
loop do
r3 = _nt_space
@@ -994,11 +994,11 @@
r0
end
module ComparisonLessThanOrEqual0
- def field
+ def attribute
elements[0]
end
def comparator
elements[2]
@@ -1019,11 +1019,11 @@
end
return cached
end
i0, s0 = index, []
- r1 = _nt_field
+ r1 = _nt_attribute
s0 << r1
if r1
s2, i2 = [], index
loop do
r3 = _nt_space
@@ -1075,11 +1075,11 @@
r0
end
module ComparisonNotEqual0
- def field
+ def attribute
elements[0]
end
def comparator
elements[2]
@@ -1100,11 +1100,11 @@
end
return cached
end
i0, s0 = index, []
- r1 = _nt_field
+ r1 = _nt_attribute
s0 << r1
if r1
s2, i2 = [], index
loop do
r3 = _nt_space
@@ -1156,11 +1156,11 @@
r0
end
module ComparisonEqual0
- def field
+ def attribute
elements[0]
end
def comparator
elements[2]
@@ -1181,11 +1181,11 @@
end
return cached
end
i0, s0 = index, []
- r1 = _nt_field
+ r1 = _nt_attribute
s0 << r1
if r1
s2, i2 = [], index
loop do
r3 = _nt_space
@@ -1309,14 +1309,14 @@
node_cache[:space][start_index] = r0
r0
end
- def _nt_field_name
+ def _nt_attribute_name
start_index = index
- if node_cache[:field_name].has_key?(index)
- cached = node_cache[:field_name][index]
+ if node_cache[:attribute_name].has_key?(index)
+ cached = node_cache[:attribute_name][index]
if cached
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
@index = cached.interval.end
end
return cached
@@ -1341,10 +1341,10 @@
r0 = nil
else
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
end
- node_cache[:field_name][start_index] = r0
+ node_cache[:attribute_name][start_index] = r0
r0
end
module Time0
\ No newline at end of file