Class: Card::Query::ActionQuery
Overview
support CQL queries that require the card_acts table
Instance Attribute Summary
#comment, #conditions, #conditions_on_join, #joins, #mods, #negate, #statement, #subqueries, #superquery, #table_seq, #vars
Instance Method Summary
collapse
#context, #depth, #full?, #init_instance_vars, #init_query_vars, #initialize, #interpret, #root, #root?, #sql, #subquery
#fasten, #fasten_tie, #id_from_val, #inherit_fasten, #left_join?, #negate_join, #restrict, #super_conditions, #superfield, #tie, #tie_subquery, #tie_with_exist, #tie_with_in, #tie_with_join, #tie_with_join_args
#add_condition, #current_conjunction, #direct_subqueries, #fld, #next_table_suffix, #subqueries_with_fasten, #table_alias
Instance Method Details
#action_by(card) ⇒ Object
13
14
15
|
# File 'lib/card/query/action_query.rb', line 13
def action_by card
tie :act, { act_by: card }, from: :card_act_id
end
|
#action_on(card) ⇒ Object
22
23
24
|
# File 'lib/card/query/action_query.rb', line 22
def action_on card
tie :card, card, from: :card_id
end
|
#add_update_condition ⇒ Object
31
32
33
|
# File 'lib/card/query/action_query.rb', line 31
def add_update_condition
add_condition "#{fld :action_type} = 1"
end
|
#table ⇒ Object
5
6
7
|
# File 'lib/card/query/action_query.rb', line 5
def table
"card_actions"
end
|
#table_prefix ⇒ Object
9
10
11
|
# File 'lib/card/query/action_query.rb', line 9
def table_prefix
"cn"
end
|
#update_action_by(card) ⇒ Object
17
18
19
20
|
# File 'lib/card/query/action_query.rb', line 17
def update_action_by card
add_update_condition
action_by card
end
|
#update_action_on(card) ⇒ Object
26
27
28
29
|
# File 'lib/card/query/action_query.rb', line 26
def update_action_on card
add_update_condition
action_on card
end
|