@@ -85,15 +85,15 @@ defmodule Sqlitex.Statement do
85
85
86
86
Also accepts the following keyword options:
87
87
88
- * `db_timeout` - The time in ms allowed for the statement to run. Defaults to 5000, or the :esqlite3_timeout value in Application env.
88
+ * `db_timeout` - The time in ms allowed for the statement to run. Defaults to 5000, or the :db_timeout value in Application env.
89
89
90
90
## Returns
91
91
92
92
* `{:ok, statement}` on success
93
93
* See `:esqlite3.prepare` for errors.
94
94
"""
95
95
def prepare ( db , sql , opts \\ [ ] ) do
96
- timeout = Keyword . get ( opts , :db_timeout , Config . esqlite3_timeout )
96
+ timeout = Keyword . get ( opts , :db_timeout , Config . db_timeout ( ) )
97
97
98
98
with { :ok , stmt } <- do_prepare ( db , sql , timeout ) ,
99
99
{ :ok , stmt } <- get_column_names ( stmt , timeout ) ,
@@ -124,7 +124,7 @@ defmodule Sqlitex.Statement do
124
124
125
125
Also accepts the following keyword options:
126
126
127
- * `db_timeout` - The time in ms allowed for the statement to run. Defaults to 5000, or the :esqlite3_timeout value in Application env.
127
+ * `db_timeout` - The time in ms allowed for the statement to run. Defaults to 5000, or the :db_timeout value in Application env.
128
128
129
129
## Returns
130
130
@@ -142,7 +142,7 @@ defmodule Sqlitex.Statement do
142
142
* `%Decimal` - Converted into a number.
143
143
"""
144
144
def bind_values ( statement , values , opts \\ [ ] ) do
145
- timeout = Keyword . get ( opts , :db_timeout , Config . esqlite3_timeout )
145
+ timeout = Keyword . get ( opts , :db_timeout , Config . db_timeout ( ) )
146
146
147
147
case :esqlite3 . bind ( statement . statement , translate_bindings ( values ) , timeout ) do
148
148
{ :error , _ } = error -> error
@@ -215,15 +215,15 @@ defmodule Sqlitex.Statement do
215
215
216
216
Also accepts the following keyword options:
217
217
218
- * `db_timeout` - The time in ms allowed for the statement to run. Defaults to 5000, or the :esqlite3_timeout value in Application env.
218
+ * `db_timeout` - The time in ms allowed for the statement to run. Defaults to 5000, or the :db_timeout value in Application env.
219
219
220
220
## Returns
221
221
222
222
* `:ok`
223
223
* `{:error, error}`
224
224
"""
225
225
def exec ( statement , opts \\ [ ] ) do
226
- timeout = Keyword . get ( opts , :db_timeout , Config . esqlite3_timeout )
226
+ timeout = Keyword . get ( opts , :db_timeout , Config . db_timeout ( ) )
227
227
228
228
case :esqlite3 . step ( statement . statement , timeout ) do
229
229
# esqlite3.step returns some odd values, so lets translate them:
0 commit comments