fluiddb 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/FluidDb/Pgsql.rb +9 -4
  2. metadata +2 -2
data/lib/FluidDb/Pgsql.rb CHANGED
@@ -11,19 +11,24 @@ module FluidDb
11
11
  def connect()
12
12
  uri = @uri
13
13
  host = uri.host
14
- database = uri.path.sub( "/", "" )
14
+ dbname = uri.path.sub( "/", "" )
15
15
 
16
+ hash = ["host", host, "dbname", dbname]
17
+ hash["port"] = uri.user unless uri.port.nil?
18
+ hash["user"] = uri.user unless uri.user.nil?
19
+ hash["password"] = uri.password unless uri.password.nil?
20
+
16
21
  @connection = PG.connect( dbname:uri.path.sub( "/", "" ) )
17
22
  end
18
-
23
+
19
24
  def close
20
25
  @connection.close
21
26
  end
22
-
27
+
23
28
  def queryForArray( sql, params )
24
29
  sql = self.format_to_sql( sql, params )
25
30
  results = @connection.exec(sql)
26
-
31
+
27
32
  # if ( $result === false ) then
28
33
  # $message = pg_last_error( $this->connection );
29
34
  # throw new Fluid_ConnectionException( $message );
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.20
4
+ version: 0.0.21
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: 2013-03-27 00:00:00.000000000 Z
12
+ date: 2013-03-28 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A semantic layer for db interaction
15
15
  email: guy@guyirvine.com