Module: Sequel::Firebird::DatasetMethods

Included in:
Dataset
Defined in:
lib/sequel/adapters/shared/firebird.rb

Constant Summary collapse

BOOL_TRUE =
'1'.freeze
BOOL_FALSE =
'0'.freeze
NULL =
LiteralString.new('NULL').freeze
SELECT_CLAUSE_METHODS =
Dataset.clause_methods(:select, %w'with select distinct limit columns from join where group having compounds order')
INSERT_CLAUSE_METHODS =
Dataset.clause_methods(:insert, %w'insert into columns values returning')
FIRST =
" FIRST ".freeze
SKIP =
" SKIP ".freeze
DEFAULT_FROM =
" FROM RDB$DATABASE"

Instance Method Summary collapse

Instance Method Details

#insert(*values) ⇒ Object

Insert given values into the database.



162
163
164
165
166
167
168
# File 'lib/sequel/adapters/shared/firebird.rb', line 162

def insert(*values)
  if @opts[:sql] || @opts[:returning]
    super
  else
    returning(insert_pk).insert(*values){|r| return r.values.first}
  end
end

#insert_select(*values) ⇒ Object

Insert a record returning the record inserted



171
172
173
# File 'lib/sequel/adapters/shared/firebird.rb', line 171

def insert_select(*values)
  returning.insert(*values){|r| return r}
end

#requires_sql_standard_datetimes?Boolean

Returns:

  • (Boolean)


175
176
177
# File 'lib/sequel/adapters/shared/firebird.rb', line 175

def requires_sql_standard_datetimes?
  true
end

#supports_insert_select?Boolean

Returns:

  • (Boolean)


179
180
181
# File 'lib/sequel/adapters/shared/firebird.rb', line 179

def supports_insert_select?
  true
end

#supports_intersect_except?Boolean

Firebird does not support INTERSECT or EXCEPT

Returns:

  • (Boolean)


184
185
186
# File 'lib/sequel/adapters/shared/firebird.rb', line 184

def supports_intersect_except?
  false
end