@@ -14,14 +14,16 @@ This driver implements the DataObjects API for the PostgreSQL relational databas
14
14
15
15
An example of usage:
16
16
17
- # default user (postgres, postgres), default port (5432)
18
- DataObjects::Connection.new("postgres://host/database")
19
- # specified user, specified port
20
- DataObjects::Connection.new("postgres://user:pass@host:8888/database")
17
+ ``` ruby
18
+ # default user (postgres, postgres), default port (5432)
19
+ DataObjects ::Connection .new (" postgres://host/database" )
20
+ # specified user, specified port
21
+ DataObjects ::Connection .new (" postgres://user:pass@host:8888/database" )
21
22
22
- @connection = DataObjects::Connection.new("postgres://localhost/employees")
23
- @reader = @connection.create_command('SELECT * FROM users').execute_reader
24
- @reader.next!
23
+ @connection = DataObjects ::Connection .new (" postgres://localhost/employees" )
24
+ @reader = @connection .create_command(' SELECT * FROM users' ).execute_reader
25
+ @reader .next!
26
+ ```
25
27
26
28
## Requirements
27
29
@@ -38,7 +40,9 @@ Additionally you should have the following prerequisites:
38
40
39
41
To install the gem:
40
42
41
- gem install do_postgres
43
+ ``` ruby
44
+ gem install do_postgres
45
+ ```
42
46
43
47
To compile and install from source:
44
48
@@ -59,15 +63,15 @@ To compile and install from source:
59
63
* Run ` rake-compiler cross-ruby ` .
60
64
* Run ` rake-compiler update-config ` .
61
65
62
- * For JRuby extensions:
63
- * Install the Java Development Kit (provided if you are
64
- on a recent version of Mac OS X) from < http://java.sun.com > .
65
- * Install a recent version of JRuby. Ensure ` jruby ` is in your ` PATH ` and/or
66
- you have configured the ` JRUBY_HOME ` environment variable to point to your
67
- JRuby installation.
68
- * Install ` data_objects ` and ` do_jdbc ` with ` jruby -S rake install ` .
66
+ * For JRuby extensions:
67
+ * Install the Java Development Kit (provided if you are
68
+ on a recent version of Mac OS X) from < http://java.sun.com > .
69
+ * Install a recent version of JRuby. Ensure ` jruby ` is in your ` PATH ` and/or
70
+ you have configured the ` JRUBY_HOME ` environment variable to point to your
71
+ JRuby installation.
72
+ * Install ` data_objects ` and ` do_jdbc ` with ` jruby -S rake install ` .
69
73
70
- * Then, install this driver with ` (jruby -S) rake install ` .
74
+ * Then, install this driver with ` (jruby -S) rake install ` .
71
75
72
76
For more information, see the PostgreSQL driver wiki page:
73
77
< http://wiki.github.com/datamapper/do/postgresql > .
0 commit comments