From 046cb80d9aa310afd3a6e9c3d79e1f9ec235bd93 Mon Sep 17 00:00:00 2001 From: Gabriel Venegas Date: Mon, 16 Dec 2024 08:05:19 -0600 Subject: [PATCH] Added test scenario where OBJECT parameters are not key=tuple --- tests/__snapshots__/test_structured_datatypes.ambr | 3 +++ tests/test_structured_datatypes.py | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/__snapshots__/test_structured_datatypes.ambr b/tests/__snapshots__/test_structured_datatypes.ambr index b09aabaf..714f5d57 100644 --- a/tests/__snapshots__/test_structured_datatypes.ambr +++ b/tests/__snapshots__/test_structured_datatypes.ambr @@ -11,6 +11,9 @@ # name: test_compile_table_with_structured_data_type[structured_type1] 'CREATE TABLE clustered_user (\t"Id" INTEGER NOT NULL AUTOINCREMENT, \tname OBJECT(key1 VARCHAR(16777216), key2 DECIMAL(10, 0)), \tPRIMARY KEY ("Id"))' # --- +# name: test_compile_table_with_structured_data_type[structured_type2] + 'CREATE TABLE clustered_user (\t"Id" INTEGER NOT NULL AUTOINCREMENT, \tname OBJECT(key1 VARCHAR(16777216), key2 DECIMAL(10, 0)), \tPRIMARY KEY ("Id"))' +# --- # name: test_insert_map list([ (1, '{\n "100": "item1",\n "200": "item2"\n}'), diff --git a/tests/test_structured_datatypes.py b/tests/test_structured_datatypes.py index fc17a8a4..d6beb3e9 100644 --- a/tests/test_structured_datatypes.py +++ b/tests/test_structured_datatypes.py @@ -27,6 +27,7 @@ [ MAP(NUMBER(10, 0), MAP(NUMBER(10, 0), TEXT(16777216))), OBJECT(key1=(TEXT(16777216), False), key2=(NUMBER(10, 0), False)), + OBJECT(key1=TEXT(16777216), key2=NUMBER(10, 0)), ], ) def test_compile_table_with_structured_data_type(