class

Miner::Table

Inherits Reference < Object

Constructors

new(name : String, analias : String | Nil = nil, database : Miner::Database = Miner.default_database)

Create the table object

At it's simplest, a table can be initialized with just a table name

table = Miner::Table.new "countries"

You can specify an alias to refer to the table when it is used within a query

table = Miner::table.new "countries", "the_countries_table"

You can specify a database other than the default by passing it as the third argument

table = Miner::Table.new "countries", nil, Miner::Database.new(config)
Source

Instance methods

alias
Source
alias=(alias __arg0 : String)
Source
field(name : String) : Field | Nil
Source
fields
Source
has_field?(name : String) : Bool
Source
has_relationship?(name : String) : Bool
Source
name
Source
primary_key
Source
relationship(name : String) : Relationship | Nil
Source
relationships
Source