Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move PostgreSQL's DatabaseStatements out of the PostgreSQLAdapter nam…

…e-space
  • Loading branch information...
commit ad0ec07f0076a0eb460332c2a98746864bd15c4c 1 parent 06e7fec
@kares kares authored
View
7 activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb
@@ -1,6 +1,6 @@
module ActiveRecord
module ConnectionAdapters
- class PostgreSQLAdapter < AbstractAdapter
+ module PostgreSQL
module DatabaseStatements
def explain(arel, binds = [])
sql = "EXPLAIN #{to_sql(arel, binds)}"
@@ -94,6 +94,11 @@ def create
super.insert
end
+ # The internal PostgreSQL identifier of the money data type.
+ MONEY_COLUMN_TYPE_OID = 790 #:nodoc:
+ # The internal PostgreSQL identifier of the BYTEA data type.
+ BYTEA_COLUMN_TYPE_OID = 17 #:nodoc:
+
# create a 2D array representing the result set
def result_as_array(res) #:nodoc:
# check if we have any binary column and if they need escaping
View
7 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -245,7 +245,7 @@ class Table < ActiveRecord::ConnectionAdapters::Table
include PostgreSQL::Quoting
include PostgreSQL::ReferentialIntegrity
include PostgreSQL::SchemaStatements
- include DatabaseStatements
+ include PostgreSQL::DatabaseStatements
include Savepoints
# Returns 'PostgreSQL' as adapter name for identification purposes.
@@ -671,11 +671,6 @@ def prepare_statement(sql)
@statements[sql_key]
end
- # The internal PostgreSQL identifier of the money data type.
- MONEY_COLUMN_TYPE_OID = 790 #:nodoc:
- # The internal PostgreSQL identifier of the BYTEA data type.
- BYTEA_COLUMN_TYPE_OID = 17 #:nodoc:
-
# Connects to a PostgreSQL server and sets up the adapter depending on the
# connected server's characteristics.
def connect
Please sign in to comment.
Something went wrong with that request. Please try again.