trying to make some REST type calls from sinatra using postgres jsonb.  
each of our tables is like :   id: primary key,   data: jsonb

db.run ('create table .....')  runs fine and creates table 

res = db.run("select data from signups;")
post res 
  ==> runs without error but no output


db.run(insert into signups (data) values ('{"email"=>"[email protected]", 
  "full_name": "john doe"}') ) 
  ==>  does not run - the db.run wants quotes but so does the postgres 
values statement - tried to escape the quotes with \'  but that didn't work 
either 

db[:posts].insert(:data=>Sequel.pg_jsonb(data))
  ==>  works fine  but is hard to call from function 

we'll have to run delete as well but that should be easy if we can get 
db.run (....) to work 

any suggestions   are we missing something simple with db.run ?  

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to