Is it possible to marshal a dataset? I really mean the Dataset instance itself, not the result set.

On unmarshalling, the dataset would have to be reassociated with the database somehow.

To be precise, this is what I wanted:

require 'sequel'

DB = Sequel.sqlite

DB.create_table :t do
  primary_key :id
  float :f
end

q = DB[:t].filter{ f > 3 }
puts q.sql        # => SELECT * FROM `t` WHERE (`f` > 3)

s = Marshal.dump(q)
 # fails here, because there's a proc in q, and a database

qq = Marshal.load(s)
# qq.connect DB ?
puts qq.sql       # => SELECT * FROM `t` WHERE (`f` > 3)


--
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to