Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mark a couple dataset methods private in jdbc/postgres adapter

  • Loading branch information...
commit d2435d85c020b88180f6db48ae86031736f14d70 1 parent 3710b1d
@jeremyevans authored
Showing with 10 additions and 8 deletions.
  1. +10 −8 lib/sequel/adapters/jdbc/postgresql.rb
View
18 lib/sequel/adapters/jdbc/postgresql.rb
@@ -43,7 +43,7 @@ def setup_connection(conn)
class Dataset < JDBC::Dataset
include Sequel::Postgres::DatasetMethods
APOS = Dataset::APOS
-
+
class ::Sequel::JDBC::Dataset::TYPE_TRANSLATOR
# Convert Java::OrgPostgresqlJdbc4::Jdbc4Array to ruby arrays
def pg_array(v)
@@ -73,6 +73,15 @@ def _pg_array(v)
PG_ARRAY_METHOD = TYPE_TRANSLATOR_INSTANCE.method(:pg_array)
PG_OBJECT_METHOD = TYPE_TRANSLATOR_INSTANCE.method(:pg_object)
+ # Add the shared PostgreSQL prepared statement methods
+ def prepare(*args)
+ ps = super
+ ps.extend(::Sequel::Postgres::DatasetMethods::PreparedStatementMethods)
+ ps
+ end
+
+ private
+
# Handle PostgreSQL array and object types. Object types are just
# turned into strings, similarly to how the native adapter treats
# the types.
@@ -87,13 +96,6 @@ def convert_type_proc(v)
end
end
- # Add the shared PostgreSQL prepared statement methods
- def prepare(*args)
- ps = super
- ps.extend(::Sequel::Postgres::DatasetMethods::PreparedStatementMethods)
- ps
- end
-
# Literalize strings similar to the native postgres adapter
def literal_string_append(sql, v)
sql << APOS << db.synchronize{|c| c.escape_string(v)} << APOS
Please sign in to comment.
Something went wrong with that request. Please try again.