class Data::Pg::Meta

Defined in:

data/pg/meta.cr:1
data/pg/meta.cr:41

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Object

to_toml : String to_toml

Constructor Detail

def self.new(table : Nil | String, columns : Nil | Array(Data::Pg::Column) = nil) #

[View source]

Class Method Detail

def self.from_csv(buf : String) : Hash(String, Meta) #

[View source]
def self.query(table : String | Nil = nil, ignore_pg_catalog : Bool = false) : String #

[View source]

Instance Method Detail

def columns : Array(Column) #

var foo = Foo.new(self) [name.value.id ] Foo.new(self) [name.value.name] new [name.value.id.stringify.gsub(/.new\b.*$/, "")] "Foo"


def columns=(v : Array(Column)) : Array(Column) #

var foo = Foo.new(self) [name.value.id ] Foo.new(self) [name.value.name] new [name.value.id.stringify.gsub(/.new\b.*$/, "")] "Foo"


def columns=(v : Nil) #

nil assignments are always ignored


def columns? : Array(Column) | Nil #

var foo = Foo.new(self) [name.value.id ] Foo.new(self) [name.value.name] new [name.value.id.stringify.gsub(/.new\b.*$/, "")] "Foo"


def data_sql(pg_before_sql : String) : String #

[View source]
def table : String #

def table=(v : String) : String #

def table=(v : Nil) #

nil assignments are always ignored


def table? : String | Nil #

def to_clickhouse : Clickhouse::Schema::Create #

[View source]
def to_s(io : IO) #
Description copied from class Reference

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>

[View source]