PostgreSQL driver and toolkit for Go
 
 
 
Go to file
Jack Christensen ec460173eb Use rake instead of guard for erb compilation 2013-05-03 13:51:10 -05:00
.gitignore Initial commit 2013-03-30 12:06:27 -07:00
README.md Use rake instead of guard for erb compilation 2013-05-03 13:51:10 -05:00
Rakefile Use rake instead of guard for erb compilation 2013-05-03 13:51:10 -05:00
connection.go Add DataRowReader and change Connection.SelectFunc to use it 2013-05-01 08:51:09 -05:00
connection_pool.go Use struct instead of map[string]string for connection params 2013-04-23 08:05:05 -05:00
connection_pool_test.go Make ConnectionParameters fields public 2013-04-23 08:57:29 -05:00
connection_select_column.go Add DataRowReader and change Connection.SelectFunc to use it 2013-05-01 08:51:09 -05:00
connection_select_column_test.go Use rake instead of guard for erb compilation 2013-05-03 13:51:10 -05:00
connection_select_column_test.go.erb Use rake instead of guard for erb compilation 2013-05-03 13:51:10 -05:00
connection_select_value.go Add DataRowReader and change Connection.SelectFunc to use it 2013-05-01 08:51:09 -05:00
connection_select_value_test.go Use rake instead of guard for erb compilation 2013-05-03 13:51:10 -05:00
connection_select_value_test.go.erb Use rake instead of guard for erb compilation 2013-05-03 13:51:10 -05:00
connection_test.go Add DataRowReader and change Connection.SelectFunc to use it 2013-05-01 08:51:09 -05:00
data_row_reader.go Add DataRowReader and change Connection.SelectFunc to use it 2013-05-01 08:51:09 -05:00
data_row_reader_test.go Use rake instead of guard for erb compilation 2013-05-03 13:51:10 -05:00
data_row_reader_test.go.erb Use rake instead of guard for erb compilation 2013-05-03 13:51:10 -05:00
message_reader.go Made many things public so SelectFunc is actually usable by others 2013-04-26 17:06:49 -05:00
messages.go Made many things public so SelectFunc is actually usable by others 2013-04-26 17:06:49 -05:00
sanitize.go Rename pgx.conn to pgx.Connection 2013-04-17 08:26:01 -05:00
sanitize_test.go Rename pgx.conn to pgx.Connection 2013-04-17 08:26:01 -05:00
test_setup.sql Added connect with md5 password 2013-04-11 21:39:44 -05:00

README.md

pgx

Experimental PostgreSQL client library for Go

Usage

TODO

Development

ERB Templating

Sometimes Go code can be repetitive especially with dealing with functions that only differ in the type (e.g. ReadInt16, ReadInt32, ReadInt64). Some of this repetition can be eliminated by using a template preprocessor. pgx uses Ruby erb templates. Files that end in .go.erb are used to produce the corresponding .go files. These files are automatically automatically processed with rake.

Prerequisites:

  • Ruby
  • Rake

To automatically process .go.erb files and run the tests:

jack@hk-47~/dev/pgx$ rake test

Testing

To setup the test environment run the test_setup.sql script as a user that can create users and databases. To successfully run the connection tests for various means of authentication you must include the following in your pg_hba.conf.

local  pgx_test  pgx_none  trust
local  pgx_test  pgx_pw    password
local  pgx_test  pgx_md5   md5