@@ -103,7 +103,7 @@ def test_write_database_connection
103
103
104
104
def test_if_table_exists_fail
105
105
df = Polars ::DataFrame . new ( { "a" => [ "one" , "two" , "three" ] , "b" => [ 1 , 2 , 3 ] } )
106
- df . write_database ( "items" )
106
+ df . write_database ( "items" , if_table_exists : "fail" )
107
107
108
108
error = assert_raises ( ArgumentError ) do
109
109
df . write_database ( "items" , if_table_exists : "fail" )
@@ -113,7 +113,7 @@ def test_if_table_exists_fail
113
113
114
114
def test_if_table_exists_append
115
115
df = Polars ::DataFrame . new ( { "a" => [ "one" , "two" , "three" ] , "b" => [ 1 , 2 , 3 ] } )
116
- df . write_database ( "items" )
116
+ df . write_database ( "items" , if_table_exists : "append" )
117
117
118
118
df2 = Polars ::DataFrame . new ( { "a" => [ "four" , "five" ] , "b" => [ 4 , 5 ] } )
119
119
df2 . write_database ( "items" , if_table_exists : "append" )
@@ -123,7 +123,7 @@ def test_if_table_exists_append
123
123
124
124
def test_if_table_exists_replace
125
125
df = Polars ::DataFrame . new ( { "a" => [ "one" , "two" , "three" ] , "b" => [ 1 , 2 , 3 ] } )
126
- df . write_database ( "items" )
126
+ df . write_database ( "items" , if_table_exists : "replace" )
127
127
128
128
df2 = Polars ::DataFrame . new ( { "a" => [ "four" , "five" ] , "b" => [ 4 , 5 ] } )
129
129
df2 . write_database ( "items" , if_table_exists : "replace" )
@@ -159,7 +159,7 @@ def test_write_database_types
159
159
Polars ::Series . new ( "uint32" , [ ( 1 << 32 ) - 1 ] , dtype : Polars ::UInt32 ) ,
160
160
# Polars::Series.new("uint64", [(1 << 64) - 1], dtype: Polars::UInt64),
161
161
Polars ::Series . new ( "string" , [ "str" ] , dtype : Polars ::String ) ,
162
- Polars ::Series . new ( "time" , [ Time . now ] , dtype : Polars ::Time )
162
+ Polars ::Series . new ( "time" , [ time ] , dtype : Polars ::Time )
163
163
] )
164
164
df . write_database ( "items" )
165
165
0 commit comments