Skip to content

BLOB support for postgres, mysql and sqlite.#141

Merged
brianc merged 4 commits into
brianc:masterfrom
eugeneware:blob-support
Oct 1, 2013
Merged

BLOB support for postgres, mysql and sqlite.#141
brianc merged 4 commits into
brianc:masterfrom
eugeneware:blob-support

Conversation

@eugeneware
Copy link
Copy Markdown
Contributor

I've added support for binary data insertion into BLOB columns which addresses issue #140

Basically, any time you try to do an insert with a Buffer datatype, it will convert it into:

INSERT INTO mytable (blobvalue) VALUE (x'DEADBEAF');

For mysql and sqlite.

And for postgres:

INSERT INTO mytable (blobvalue) VALUE ('\xDEADBEAF');

@eugeneware
Copy link
Copy Markdown
Contributor Author

I've changed the encoding for postgres to use bytea hex encoding as recommended by http://www.postgresql.org/docs/9.0/static/datatype-binary.html

@brianc
Copy link
Copy Markdown
Owner

brianc commented Oct 1, 2013

awesome! Sorry for the delay on this - been totally slammed recently. 👍 ❤️

brianc added a commit that referenced this pull request Oct 1, 2013
BLOB support for postgres, mysql and sqlite.
@brianc brianc merged commit f76e13a into brianc:master Oct 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants