Guest User

Untitled

a guest
Apr 23rd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. rando@savant dm-core % irb
  2. >> require 'lib/data_mapper'
  3. Text should not be declared inline.
  4. # => true
  5. >> DataMapper.setup(:default, 'sqlite3:///home/rando/dm_test.db')
  6. # => #<DataMapper::Adapters::Sqlite3Adapter:0x2b0e312c2490 @uri=#<URI::Generic:0x15871897f4dc URL:sqlite3:/home/rando/dm_test.db>
  7. >> DataMapper.repository(:default).adapter.execute("CREATE TABLE foo (id int, name text)")
  8. # => #<DataObjects::Sqlite3::Result:0x2b0e312b6190 @affected_rows=0, @command=#<DataObjects::Sqlite3::Command:0x2b0e312b5f10 @connection=#<DataObjects::Sqlite3::Connection:0x2b0e312b6230 @connection=#<Object:0x2b0e312b6208>, concrete_commandDataObjects::Sqlite3::Command, uri#<URI::Generic:0x15871897f4dc URL:sqlite3:/home/rando/dm_test.db, @text="CREATE TABLE foo (id int, name text)">, insert_id0
  9. >> exit
  10.  
  11. rando@savant dm-core % sqlite3 ~/dm_test.db
  12. SQLite version 3.5.3
  13. Enter ".help" for instructions
  14. sqlite> .schema foo
  15. CREATE TABLE foo (id int, name text);
Add Comment
Please, Sign In to add comment