Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rando@savant dm-core % irb
- >> require 'lib/data_mapper'
- Text should not be declared inline.
- # => true
- >> DataMapper.setup(:default, 'sqlite3:///home/rando/dm_test.db')
- # => #<DataMapper::Adapters::Sqlite3Adapter:0x2b0e312c2490 @uri=#<URI::Generic:0x15871897f4dc URL:sqlite3:/home/rando/dm_test.db>
- >> DataMapper.repository(:default).adapter.execute("CREATE TABLE foo (id int, name text)")
- # => #<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
- >> exit
- rando@savant dm-core % sqlite3 ~/dm_test.db
- SQLite version 3.5.3
- Enter ".help" for instructions
- sqlite> .schema foo
- CREATE TABLE foo (id int, name text);
Add Comment
Please, Sign In to add comment