forked from jruby/activerecord-jdbc-adapter
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jdbc-mariadb gem initial setup (using MariaDB Java Client 1.1.7)
- Loading branch information
Showing
8 changed files
with
579 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
=== 1.1.7 | ||
|
||
* initial release using MariaDB Java Client 1.1.7 |
Large diffs are not rendered by default.
Oops, something went wrong.
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,20 @@ | ||
# jdbc-mariadb | ||
|
||
MariaDB Client Library (for Java Applications) is used to connect applications | ||
developed in Java to MariaDB and MySQL databases using the standard JDBC API. | ||
|
||
See https://mariadb.com/kb/en/about-the-mariadb-java-client/ | ||
|
||
## Usage | ||
|
||
To make the driver accessible to JDBC and JRuby by running : | ||
|
||
require 'jdbc/mariadb' | ||
Jdbc::MariaDB.load_driver | ||
|
||
## Copyright | ||
|
||
Copyright (c) 2014 [The JRuby Team](https://github.com/jruby). | ||
|
||
The MariaDB client library is LGPL licensed. | ||
see *LICENSE.txt* and https://www.gnu.org/licenses/lgpl.html |
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 @@ | ||
load File.expand_path('../Rakefile.jdbc', File.dirname(__FILE__)) |
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,21 @@ | ||
# -*- encoding: utf-8 -*- | ||
$LOAD_PATH << File.expand_path('../lib', __FILE__) | ||
require 'jdbc/mariadb/version' | ||
|
||
Gem::Specification.new do |gem| | ||
gem.name = %q{jdbc-mariadb} | ||
gem.version = Jdbc::MariaDB::VERSION | ||
|
||
gem.authors = ['Nick Sieger, Ola Bini, Karol Bucek and JRuby contributors'] | ||
gem.email = ['nick@nicksieger.com', 'ola.bini@gmail.com', 'self@kares.org'] | ||
gem.homepage = 'https://github.com/jruby/activerecord-jdbc-adapter' | ||
gem.licenses = ['LGPL'] | ||
|
||
gem.files = [ 'README.md', 'LICENSE.txt', *Dir['lib/**/*'].to_a ] | ||
|
||
gem.rdoc_options = ["--main", "README.md"] | ||
gem.require_paths = ["lib"] | ||
|
||
gem.summary = %q{JDBC driver for JRuby and MariaDB/MySQL (usable with ActiveRecord-JDBC).} | ||
gem.description = %q{Install this gem `require 'jdbc/mariadb'` and invoke `Jdbc::MariaDB.load_driver` within JRuby to load the driver.} | ||
end |
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,26 @@ | ||
warn "Jdbc-MariaDB is only for use with JRuby" if (JRUBY_VERSION.nil? rescue true) | ||
require 'jdbc/mariadb/version' | ||
|
||
module Jdbc | ||
module MariaDB | ||
|
||
def self.driver_jar | ||
"mariadb-java-client-#{DRIVER_VERSION}.jar" | ||
end | ||
|
||
def self.load_driver(method = :load) | ||
send method, driver_jar | ||
end | ||
|
||
def self.driver_name | ||
'org.mariadb.jdbc.Driver' | ||
end | ||
|
||
if defined?(JRUBY_VERSION) && # enable backwards-compat behavior : | ||
( Java::JavaLang::Boolean.get_boolean("jdbc.driver.autoload") || | ||
Java::JavaLang::Boolean.get_boolean("jdbc.mariadb.autoload") ) | ||
warn "autoloading JDBC driver on require 'jdbc/mariadb'" if $VERBOSE | ||
load_driver :require | ||
end | ||
end | ||
end |
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,6 @@ | ||
module Jdbc | ||
module MariaDB | ||
DRIVER_VERSION = '1.1.7' | ||
VERSION = DRIVER_VERSION | ||
end | ||
end |
Binary file not shown.