Module | Sequel::Firebird::DatabaseMethods
In: | lib/sequel/adapters/shared/firebird.rb

### Methods

clear_primary_key create_trigger database_type drop_sequence primary_key restart_sequence sequences tables views

### Constants

AUTO_INCREMENT | = | ''.freeze
TEMPORARY | = | 'GLOBAL TEMPORARY '.freeze

### Public Instance methods

clear_primary_key(*tables)

[Source]

       # File lib/sequel/adapters/shared/firebird.rb, line 7
    7:       def clear_primary_key(*tables)
    8:         tables.each{|t| @primary_keys.delete(dataset.send(:input_identifier, t))}
    9:       end

create_trigger(*args)

[Source]

        # File lib/sequel/adapters/shared/firebird.rb, line 11
    11:       def create_trigger(*args)
    12:         self << create_trigger_sql(*args)
    13:       end

database_type()

[Source]

        # File lib/sequel/adapters/shared/firebird.rb, line 15
    15:       def database_type
    16:         :firebird
    17:       end

drop_sequence(name)

[Source]

        # File lib/sequel/adapters/shared/firebird.rb, line 19
    19:       def drop_sequence(name)
    20:         self << drop_sequence_sql(name)
    21:       end

primary_key(table)

Return primary key for the given table.

[Source]

        # File lib/sequel/adapters/shared/firebird.rb, line 24
    24:       def primary_key(table)
    25:         t = dataset.send(:input_identifier, table)
    26:         @primary_keys.fetch(t) do
    27:           pk = fetch("SELECT RDB$FIELD_NAME FROM RDB$INDEX_SEGMENTS NATURAL JOIN RDB$RELATION_CONSTRAINTS WHERE RDB$CONSTRAINT_TYPE = 'PRIMARY KEY' AND RDB$RELATION_NAME = ?", t).single_value
    28:           @primary_keys[t] = dataset.send(:output_identifier, pk.rstrip) if pk
    29:         end
    30:       end

restart_sequence(*args)

[Source]

        # File lib/sequel/adapters/shared/firebird.rb, line 32
    32:       def restart_sequence(*args)
    33:         self << restart_sequence_sql(*args)
    34:       end

sequences(opts={}) {|ds| ...}

[Source]

        # File lib/sequel/adapters/shared/firebird.rb, line 36
    36:       def sequences(opts={})
    37:         ds = self["rdb$generators""rdb$generators"].server(opts[:server]).filter("rdb$system_flag""rdb$system_flag" => 0).select("rdb$generator_name""rdb$generator_name")
    38:         block_given? ? yield(ds) : ds.map{|r| ds.send(:output_identifier, r["rdb$generator_name""rdb$generator_name"])}
    39:       end

tables(opts={})

[Source]

        # File lib/sequel/adapters/shared/firebird.rb, line 41
    41:       def tables(opts={})
    42:         tables_or_views(0, opts)
    43:       end

views(opts={})

[Source]

        # File lib/sequel/adapters/shared/firebird.rb, line 45
    45:       def views(opts={})
    46:         tables_or_views(1, opts)
    47:       end

[Validate]