Commit 0e90b8e
committed
Add Elixir API for set_busy_timeout and cancel
- Add NIF stubs: set_busy_timeout/2, cancel/1
- Add public wrappers: Sqlite3.set_busy_timeout/2, Sqlite3.cancel/1
- cancel/1 includes nil guard (matches close/1 and interrupt/1 convention)
- Fix bind_parameter_count/1 typespec: integer -> non_neg_integer() | {:error, reason()}
- Fix bind_parameter_index/2 typespec: integer -> non_neg_integer() | {:error, reason()}
The typespec fixes address pre-existing dialyzer warnings - both NIFs can return
{:error, :invalid_statement} when statement->statement is NULL.1 parent de700d3 commit 0e90b8e
2 files changed
Lines changed: 33 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
103 | 126 | | |
104 | 127 | | |
105 | 128 | | |
| |||
136 | 159 | | |
137 | 160 | | |
138 | 161 | | |
139 | | - | |
| 162 | + | |
140 | 163 | | |
141 | 164 | | |
142 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
72 | | - | |
| 78 | + | |
73 | 79 | | |
74 | 80 | | |
75 | | - | |
| 81 | + | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| |||
0 commit comments