class Dsx::Dml::Table
Public Class Methods
new(changeset, table_name)
click to toggle source
# File lib/dsx/dml.rb, line 114 def initialize(changeset, table_name) @changeset = changeset @table_name = table_name @changeset.stack << "T #{@table_name}" end
Public Instance Methods
batch()
click to toggle source
# File lib/dsx/dml.rb, line 128 def batch @changeset end
curl(params)
click to toggle source
# File lib/dsx/dml.rb, line 136 def curl(params) @changeset.curl(params) end
delete()
click to toggle source
# File lib/dsx/dml.rb, line 156 def delete fields(data={}) @changeset.stack << 'D' return self end
done()
click to toggle source
# File lib/dsx/dml.rb, line 124 def done @changeset end
net_sftp(params)
click to toggle source
# File lib/dsx/dml.rb, line 132 def net_sftp(params) @changeset.net_sftp(params) end
queue(data)
click to toggle source
# File lib/dsx/dml.rb, line 140 def queue(data) fields(data) end
table(table_name)
click to toggle source
# File lib/dsx/dml.rb, line 120 def table(table_name) @changeset.table(table_name) end
update(data={})
click to toggle source
# File lib/dsx/dml.rb, line 150 def update(data={}) fields(data) @changeset.stack << 'U' return self end
write(data={})
click to toggle source
# File lib/dsx/dml.rb, line 144 def write(data={}) fields(data) @changeset.stack << 'W' return self end
Private Instance Methods
blank(command)
click to toggle source
# File lib/dsx/dml.rb, line 168 def blank(command) single(command, '') end
fields(hash)
click to toggle source
# File lib/dsx/dml.rb, line 164 def fields(hash) hash.each { |k,v| single(k,v) } end
single(command, val)
click to toggle source
# File lib/dsx/dml.rb, line 172 def single(command, val) @changeset.stack << "F #{command} ^#{val}^^^" return self end