-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support extra BLOB types (BYTEA, BYTES) (#26)
Supporting [this](https://www.cockroachlabs.com/docs/stable/bytes.html)
- Loading branch information
Showing
6 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
cockroachdb-dialect/src/test/fixtures_cockroachdb/blob-data-type/1.s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE TABLE foo( | ||
id INT NOT NULL, | ||
bar1 BYTEA NOT NULL, | ||
bar2 BLOB NOT NULL, | ||
bar3 BYTES NOT NULL, | ||
PRIMARY KEY (id) | ||
); |
7 changes: 7 additions & 0 deletions
7
integration-testing/src/main/resources/migrations/v202307111418__blob_data_types.sqm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE TABLE blob_data_types( | ||
id INT NOT NULL, | ||
bytea_col BYTEA NOT NULL, | ||
blob_col BLOB NOT NULL, | ||
bytes_col BYTES NOT NULL, | ||
PRIMARY KEY (id) | ||
); |
6 changes: 6 additions & 0 deletions
6
...ration-testing/src/main/sqldelight/com/faire/sqldelight/dialects/cockroachdb/BlobTypes.sq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
create: | ||
INSERT INTO blob_data_types VALUES ?; | ||
|
||
selectAll: | ||
SELECT * | ||
FROM blob_data_types; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters