class SQLite3Wrapper

Public Class Methods

new(db_file_name) click to toggle source
# File lib/railz_lite/models/wrappers/sqlite3_wrapper.rb, line 4
def initialize(db_file_name)
  @db = SQLite3::Database.new(db_file_name)
  @db.results_as_hash = true
  @db.type_translation = true

  @db
end

Private Class Methods

last_insert_row_id() click to toggle source
# File lib/railz_lite/models/wrappers/sqlite3_wrapper.rb, line 27
def self.last_insert_row_id
  @db.last_insert_row_id
end

Public Instance Methods

execute(*args) click to toggle source
# File lib/railz_lite/models/wrappers/sqlite3_wrapper.rb, line 12
def execute(*args)
  @db.execute(*args)
end
execute2(*args) click to toggle source
# File lib/railz_lite/models/wrappers/sqlite3_wrapper.rb, line 16
def execute2(*args)
  @db.execute2(*args)
end
insert(*args) click to toggle source
# File lib/railz_lite/models/wrappers/sqlite3_wrapper.rb, line 20
def insert(*args)
  execute(*args)
  last_insert_row_id
end