Class: Jaql::SqlGeneration::RunnableQuery::Context
- Inherits:
-
Object
- Object
- Jaql::SqlGeneration::RunnableQuery::Context
- Defined in:
- lib/jaql/sql_generation/runnable_query.rb
Overview
The context of a particular run Currently just a temporary relation name generator
Instance Method Summary collapse
-
#initialize(prefix = nil) ⇒ Context
constructor
A new instance of Context.
- #tmp_relation_name ⇒ Object
Constructor Details
#initialize(prefix = nil) ⇒ Context
40 41 42 43 |
# File 'lib/jaql/sql_generation/runnable_query.rb', line 40 def initialize(prefix=nil) @prefix = prefix || 'r' @relation_num = 0 end |
Instance Method Details
#tmp_relation_name ⇒ Object
45 46 47 48 |
# File 'lib/jaql/sql_generation/runnable_query.rb', line 45 def tmp_relation_name() @relation_num += 1 "#{@prefix}#{@relation_num}" end |