class Amatista::Model

Defined in:

amatista/model.cr

Class Method Summary

Class Method Detail

def self.connect(&block) #

Executes a query against a database. Example

class Task  Amatista::Model
  def self.all
    records = [] of String
    connect {|db| records = db.exec("select * from tasks order by done").rows }
    records
  end
end

[View source]