Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support binary data #34

Closed
snooppy opened this issue Mar 6, 2015 · 1 comment
Closed

Support binary data #34

snooppy opened this issue Mar 6, 2015 · 1 comment

Comments

@snooppy
Copy link

snooppy commented Mar 6, 2015

Hi there! It would be great if DbSetup supported binary data. Is it possible to implement?

@jnizet
Copy link
Member

jnizet commented Mar 6, 2015

I just tested inserting a byte array into a varbinary HSQLDB column, and it works fine.
I did the same test for a byte array into a bytea PostgreSQL column, and it works fine too:

create table bintest (
  id bigint,
  vb bytea,
  primary key (id));
        Operation operation =
            sequenceOf(
                deleteAllFrom("bintest"),
                insertInto("bintest")
                    .columns("id", "vb")
                    .values(1L, new byte[] {1, 2, 3})
                    .build());
        new DbSetup(destination, operation).launch();

Which database are you using, how is your binary column defined, and what have you tried to insert binary data?

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

No branches or pull requests

2 participants