Sha256: f43003893c72942d0b596368cc6b58fe2750286c2168aaea0d7ba2bcd2b2ca49

Contents?: true

Size: 496 Bytes

Versions: 13

Compression:

Stored size: 496 Bytes

Contents

require 'clevic.rb'
require 'sequel'

path = "#{ENV['HOME']}/projects/clevic/models/times.sqlite3"

constring =
if RUBY_PLATFORM == 'java'
  "jdbc:sqlite://#{path}"
else
  "sqlite://#{path}"
end

Sequel.connect constring

require 'times_models.rb'

# Sqlite needs this plugin cos it stores Date/Times as Strings
# and the driver doesn't translate them when loading

class Entry
  plugin :typecast_on_load, :date, :start, :end
end

class Invoice
  plugin :typecast_on_load, :quote_date, :date
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
clevic-0.14.6 models/times_sqlite_models.rb
clevic-0.14.5 models/times_sqlite_models.rb
clevic-0.14.4 models/times_sqlite_models.rb
clevic-0.14.3 models/times_sqlite_models.rb
clevic-0.14.2 models/times_sqlite_models.rb
clevic-0.14.1 models/times_sqlite_models.rb
clevic-0.14.0 models/times_sqlite_models.rb
clevic-0.13.0.b12 models/times_sqlite_models.rb
clevic-0.13.0.b11 models/times_sqlite_models.rb
clevic-0.13.0.b10 models/times_sqlite_models.rb
clevic-0.13.0.b9 models/times_sqlite_models.rb
clevic-0.13.0.b6 models/times_sqlite_models.rb
clevic-0.13.0.b5 models/times_sqlite_models.rb