22
22
datetime .date (2013 , 10 , 10 ),
23
23
datetime .datetime (2013 , 10 , 10 , 11 , 27 , 16 ),
24
24
datetime .time (11 , 27 , 16 ),
25
- b'\xef '
25
+ b'\xef ' ,
26
+ {
27
+ 'name' : 'John Doe' ,
28
+ 'age' : 100 ,
29
+ },
30
+ [1 , 2 , 3 ],
26
31
]
27
32
28
33
47
52
{'name' : 'date' , 'type' : types .DATE (), 'nullable' : True , 'default' : None },
48
53
{'name' : 'datetime' , 'type' : types .DATETIME (), 'nullable' : True , 'default' : None },
49
54
{'name' : 'time' , 'type' : types .TIME (), 'nullable' : True , 'default' : None },
50
- {'name' : 'bytes' , 'type' : types .BINARY (), 'nullable' : True , 'default' : None }
55
+ {'name' : 'bytes' , 'type' : types .BINARY (), 'nullable' : True , 'default' : None },
56
+ {'name' : 'record' , 'type' : types .JSON (), 'nullable' : True , 'default' : None },
57
+ {'name' : 'array' , 'type' : types .ARRAY (types .Integer ()), 'nullable' : True , 'default' : None },
51
58
]
52
59
53
60
@@ -101,7 +108,7 @@ def query(table):
101
108
102
109
103
110
def test_reflect_select (engine , table ):
104
- assert len (table .c ) == 9
111
+ assert len (table .c ) == 11
105
112
assert isinstance (table .c .integer , Column )
106
113
assert isinstance (table .c .integer .type , types .Integer )
107
114
assert isinstance (table .c .timestamp .type , types .TIMESTAMP )
@@ -112,6 +119,8 @@ def test_reflect_select(engine, table):
112
119
assert isinstance (table .c .datetime .type , types .DATETIME )
113
120
assert isinstance (table .c .time .type , types .TIME )
114
121
assert isinstance (table .c .bytes .type , types .BINARY )
122
+ assert isinstance (table .c .record .type , types .JSON )
123
+ assert isinstance (table .c .array .type , types .ARRAY )
115
124
116
125
rows = table .select ().execute ().fetchall ()
117
126
assert len (rows ) == 1000
0 commit comments