The OpenBase adapter works with the Ruby/Openbase driver by Tetsuya Suzuki. www.spice-of-life.net/ruby-openbase/ (needs version 0.7.3+)
Options:
-
:host
-- Defaults to localhost -
:username
-- Defaults to nothing -
:password
-- Defaults to nothing -
:database
-- The name of the database. No default, must be provided.
The OpenBase adapter will make use of OpenBase’s ability to generate unique ids for any column with an unique index applied. Thus, if the value of a primary key is not specified at the time an INSERT is performed, the adapter will prefetch a unique id for the primary key. This prefetching is also necessary in order to return the id after an insert.
Caveat: Operations involving LIMIT and OFFSET do not yet work!
Maintainer: gmail at derrick.spell.com
- A
- N
- P
- Q
- S
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb, line 60 def adapter_name 'OpenBase' end
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb, line 64 def native_database_types { :primary_key => "integer UNIQUE INDEX DEFAULT _rowid", :string => { :name => "char", :limit => 4096 }, :text => { :name => "text" }, :integer => { :name => "integer" }, :float => { :name => "float" }, :decimal => { :name => "decimal" }, :datetime => { :name => "datetime" }, :timestamp => { :name => "timestamp" }, :time => { :name => "time" }, :date => { :name => "date" }, :binary => { :name => "object" }, :boolean => { :name => "boolean" } } end
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb, line 93 def next_sequence_value(sequence_name) ary = sequence_name.split(' ') if (!ary[1]) then ary[0] =~ %r(\w+)_nonstd_seq/ ary[0] = $1 end @connection.unique_row_id(ary[0], ary[1]) end
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb, line 85 def prefetch_primary_key?(table_name = nil) true end
QUOTING ==================================================
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb, line 105 def quote(value, column = nil) if value.kind_of?(String) && column && column.type == :binary "'#{@connection.insert_binary(value)}'" else super end end
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb, line 117 def quoted_false "0" end
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb, line 113 def quoted_true "1" end
Source: show
# File rails/activerecord/lib/active_record/connection_adapters/openbase_adapter.rb, line 81 def supports_migrations? false end