Skip to content

Commit

Permalink
#342 - Add test json column
Browse files Browse the repository at this point in the history
  • Loading branch information
gregszero committed Nov 20, 2024
1 parent cf94714 commit e8cea27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/duckdb_test/column_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def test_type
expected.push(:list)
expected.push(:struct)
expected.push(:uuid)
expected.push(:json)
assert_equal(
expected,
@columns.map(&:type)
Expand Down Expand Up @@ -70,6 +71,7 @@ def test_name
expected.push('varchar_list_col')
expected.push('struct_col')
expected.push('uuid_col')
expected.push('json_col')
assert_equal(
expected,
@columns.map(&:name)
Expand Down Expand Up @@ -120,6 +122,7 @@ def create_table_sql
sql += ', varchar_list_col VARCHAR[]'
sql += ', struct_col STRUCT(word VARCHAR, length INTEGER)'
sql += ', uuid_col UUID'
sql += ', json_col JSON'
sql += ')'
sql
end
Expand Down Expand Up @@ -154,6 +157,7 @@ def insert_sql
sql += ", ['a', 'b', 'c']"
sql += ", ROW('Ruby', 4)"
sql += ", '550e8400-e29b-41d4-a716-446655440000'"
sql += ", '{\"key\": \"value\"}'"
sql += ')'
sql
end
Expand Down

0 comments on commit e8cea27

Please sign in to comment.