All Questions
Tagged with ruby-datamapper sqlite3-ruby
5 questions
0
votes
0
answers
42
views
how do i save large amount of data into DB using DataMapper
Im trying to insert into the database but sinatra throws this error
DataObjects::ConnectionError at /
database is locked
at line Name.create(babyname: name ,year1900: results[0] ,year1910: results[...
1
vote
1
answer
116
views
can I join two join resources together?
The way I have implemented it, it would appear not.
In data_mapper terms - I have a join resource Entry, that joins Driver, Team and Season
I have a join resource Race that joins Track and Season
I ...
0
votes
1
answer
1k
views
How can I resolve the DataObjects::ConnectionError when running with data_mapper (Ruby 1.8.7)
When I run this code
require 'rubygems'
require 'data_mapper'
require "sqlite3"
DataMapper::setup(:default, "sqlite3://#{Dir.pwd}./prod.db")
class Person
include DataMapper::Resource
property :...
0
votes
1
answer
808
views
How to: Single Table Inheritance in DataMapper?
I'm learning Sinatra (1.3.2) and chose to use DataMapper (1.2.0) as ORM and an in-memory SQLite (1.3.6) DB to start.
Two models, Books and Downloads, are sharing most attributes, so I looked into ...
1
vote
1
answer
162
views
Select unique records without natural keys
For example, I have table names: id integer primary key, name text unique and unique index for names(name).
I want to select records by index-style syntax: (n12, nBill) = (Name[12], Name['Bill']) or ...