Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First shot at splitting firebird adapter into specific and shared par…
…ts, with a jdbc subadapter
- Loading branch information
1 parent
7d05fed
commit 59c36db
Showing
4 changed files
with
244 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Sequel.require 'adapters/shared/firebird' | ||
Sequel.require 'adapters/jdbc/transactions' | ||
|
||
module Sequel | ||
module JDBC | ||
# Database and Dataset instance methods for Firebird specific | ||
# support via JDBC. | ||
module Firebird | ||
# Database instance methods for Firebird databases accessed via JDBC. | ||
module DatabaseMethods | ||
include Sequel::Firebird::DatabaseMethods | ||
include Sequel::JDBC::Transactions | ||
|
||
# Add the primary_keys and primary_key_sequences instance variables, | ||
# so we can get the correct return values for inserted rows. | ||
def self.extended(db) | ||
db.instance_eval do | ||
@primary_keys = {} | ||
end | ||
end | ||
|
||
# Return instance of Sequel::JDBC::Firebird::Dataset with the given opts. | ||
def dataset(opts=nil) | ||
Sequel::JDBC::Firebird::Dataset.new(self, opts) | ||
end | ||
end | ||
|
||
# Dataset class for Firebird datasets accessed via JDBC. | ||
class Dataset < JDBC::Dataset | ||
include Sequel::Firebird::DatasetMethods | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.