Skip to content

Instantly share code, notes, and snippets.

View dkubb's full-sized avatar
🏠
Working from home

Dan Kubb dkubb

🏠
Working from home
  • Betterment
  • Mission, BC, Canada
  • X @dkubb
View GitHub Profile
rake spec results:
MySQL
102 examples, 1 failure, 1 pending
Postgres
114 examples, 10 failures, 1 pending
SQLite3
SQlite3 -- database locked
# As an exercise, come up with a ruby-way to specify
# a set of search conditions for this SQL:
# simple or
# WHERE name = 'Dan' OR name = 'Paul'
# nested or, plus duplicating field names
# WHERE name = 'Paul' AND ( age < 18 OR age > 21 )
# not ( and don't say != )
include 'dm-is-list'
class Node
include DataMapper::Resource
property :id, Serial
# other properties...
has n, :parts
end