Class: SQL::Composer::Nodes::Core
- Inherits:
-
Object
- Object
- SQL::Composer::Nodes::Core
- Defined in:
- lib/sql/composer/nodes/core.rb
Direct Known Subclasses
From, Identifier, Literal, Operations::Eql, Operations::Or, Order, Select, Value, Where
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #backend ⇒ Object
- #fetch(name, default = nil) ⇒ Object
-
#initialize(options) ⇒ Core
constructor
A new instance of Core.
- #quote(identifier) ⇒ Object
Constructor Details
#initialize(options) ⇒ Core
Returns a new instance of Core.
15 16 17 18 |
# File 'lib/sql/composer/nodes/core.rb', line 15 def initialize() @options = @id = tokens.next_id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
11 12 13 |
# File 'lib/sql/composer/nodes/core.rb', line 11 def id @id end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
13 14 15 |
# File 'lib/sql/composer/nodes/core.rb', line 13 def @options end |
Instance Method Details
#backend ⇒ Object
24 25 26 |
# File 'lib/sql/composer/nodes/core.rb', line 24 def backend fetch(:backend) end |
#fetch(name, default = nil) ⇒ Object
20 21 22 |
# File 'lib/sql/composer/nodes/core.rb', line 20 def fetch(name, default = nil) @options.fetch(name, default) end |
#quote(identifier) ⇒ Object
28 29 30 |
# File 'lib/sql/composer/nodes/core.rb', line 28 def quote(identifier) backend.quote(identifier) end |