Skip to content

Commit

Permalink
Merge pull request #194 from dbussink/add-vector-type
Browse files Browse the repository at this point in the history
Add the new VECTOR type
  • Loading branch information
jhawthorn authored Sep 10, 2024
2 parents e84501b + 799f1b7 commit e916d13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions inc/trilogy/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ typedef enum {
XX(TRILOGY_TYPE_YEAR, 0x0d) \
XX(TRILOGY_TYPE_VARCHAR, 0x0f) \
XX(TRILOGY_TYPE_BIT, 0x10) \
XX(TRILOGY_TYPE_VECTOR, 0xf2) \
XX(TRILOGY_TYPE_JSON, 0xf5) \
XX(TRILOGY_TYPE_NEWDECIMAL, 0xf6) \
XX(TRILOGY_TYPE_ENUM, 0xf7) \
Expand Down
3 changes: 3 additions & 0 deletions src/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,8 @@ int trilogy_build_stmt_execute_packet(trilogy_builder_t *builder, uint32_t stmt_
case TRILOGY_TYPE_VAR_STRING:
case TRILOGY_TYPE_STRING:
case TRILOGY_TYPE_GEOMETRY:
case TRILOGY_TYPE_JSON:
case TRILOGY_TYPE_VECTOR:
CHECKED(trilogy_builder_write_lenenc_buffer(builder, val.as.str.data, val.as.str.len));

break;
Expand Down Expand Up @@ -1059,6 +1061,7 @@ int trilogy_parse_stmt_row_packet(const uint8_t *buff, size_t len, trilogy_colum
case TRILOGY_TYPE_DECIMAL:
case TRILOGY_TYPE_NEWDECIMAL:
case TRILOGY_TYPE_JSON:
case TRILOGY_TYPE_VECTOR:
CHECKED(trilogy_reader_get_lenenc_buffer(&reader, &out_values[i].as.str.len,
(const void **)&out_values[i].as.str.data));

Expand Down

0 comments on commit e916d13

Please sign in to comment.