fluiddb 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/FluidDb.rb +2 -0
- data/lib/FluidDb/Db.rb +25 -0
- data/lib/FluidDb/Mysql.rb +1 -1
- metadata +3 -2
data/lib/FluidDb.rb
CHANGED
data/lib/FluidDb/Db.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
require "FluidDb"
|
2
|
+
|
3
|
+
module FluidDb
|
4
|
+
|
5
|
+
def FluidDb.Db( uri )
|
6
|
+
|
7
|
+
case uri.scheme
|
8
|
+
when "mysql"
|
9
|
+
require "FluidDb/Mysql"
|
10
|
+
return FluidDb::Mysql.new( uri )
|
11
|
+
when "mysql2"
|
12
|
+
require "FluidDb/Mysql2"
|
13
|
+
return FluidDb::Mysql2.new( uri )
|
14
|
+
when "pgsql"
|
15
|
+
require "FluidDb/Pgsql"
|
16
|
+
return FluidDb::Pgsql.new( uri )
|
17
|
+
when "mock"
|
18
|
+
require "FluidDb/Mock"
|
19
|
+
return FluidDb::Mock.new( uri )
|
20
|
+
else
|
21
|
+
abort("Scheme, #{uri.scheme}, not recognised when configuring creating db connection");
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
data/lib/FluidDb/Mysql.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluiddb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-06 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A semantic layer for db interaction
|
15
15
|
email: guy@guyirvine.com
|
@@ -17,6 +17,7 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- lib/FluidDb/Db.rb
|
20
21
|
- lib/FluidDb/Mock.rb
|
21
22
|
- lib/FluidDb/Mysql.rb
|
22
23
|
- lib/FluidDb/Mysql2.rb
|