class Dtmcli::Msg
Constants
- TRANS_TYPE
Attributes
dtm[R]
dtm_url[R]
gid[RW]
query_prepared[RW]
steps[RW]
Public Class Methods
new(dtm_url)
click to toggle source
# File lib/dtmcli/msg.rb, line 8 def initialize(dtm_url) @dtm_url = dtm_url @dtm = Dtm.new(dtm_url) @steps = [] @query_prepared = '' end
Public Instance Methods
add(action, post_data)
click to toggle source
# File lib/dtmcli/msg.rb, line 19 def add(action, post_data) step = { action: action, data: post_data.to_json, } @steps << step end
gen_gid()
click to toggle source
# File lib/dtmcli/msg.rb, line 15 def gen_gid @gid = IdGenerator.gen_gid(dtm_url) end
prepare(p_url)
click to toggle source
# File lib/dtmcli/msg.rb, line 27 def prepare(p_url) @query_prepared = p_url if !p_url.nil? dtm.prepare(wrap_tbody) end
submit()
click to toggle source
# File lib/dtmcli/msg.rb, line 32 def submit dtm.submit(wrap_tbody) end
wrap_tbody()
click to toggle source
# File lib/dtmcli/msg.rb, line 36 def wrap_tbody { gid: gid, trans_type: TRANS_TYPE, steps: steps, query_prepared: query_prepared } end