Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions go/libraries/doltcore/sqle/sqlfmt/row_fmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,10 @@ func interfaceValueAsSqlString(ctx *sql.Context, ti typeinfo.TypeInfo, value int
case typeinfo.DatetimeTypeIdentifier:
return singleQuote + str + singleQuote, nil
case typeinfo.InlineBlobTypeIdentifier, typeinfo.VarBinaryTypeIdentifier:
value, err := sql.UnwrapAny(ctx, value)
if err != nil {
return "", err
}
switch v := value.(type) {
case []byte:
return hexEncodeBytes(v), nil
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/bats/export-tables.bats
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ if rows[2] != "9,8,7,6,5,4".split(","):
diff --strip-trailing-cr $BATS_TEST_DIRNAME/helper/1pk5col-ints.sql export.sql

# string columns
dolt sql -q "create table strings (a varchar(10) primary key, b char(10))"
dolt sql -q "insert into strings values ('abc', '123'), ('def', '456')"
dolt sql -q "create table strings (a varchar(10) primary key, b char(10), c text, d blob)"
dolt sql -q "insert into strings values ('abc', '123', 'do re me', 'qwe'), ('def', '456', 'fa so la', 'rty')"
dolt add .
dolt commit -am "Checkpoint"

Expand Down
Loading