Skip to content

Commit 71fa957

Browse files
committed
Update UDF.jl
Remove unused registerfunc.
1 parent ae1ec8d commit 71fa957

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/UDF.jl

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
# aggregate functions
2-
function registerfunc(db::SQLiteDB, nargs::Integer, step::Function, final::Function, isdeterm::Bool=true; name="")
3-
@assert nargs <= 127 "only varargs functions can have more than 127 arguments"
4-
# assume any negative number means a varargs function
5-
nargs < -1 && (nargs = -1)
6-
7-
name = isempty(name) ? string(step) : name::String
8-
cstep = cfunction(step, Nothing, (Ptr{Void}, Cint, Ptr{Ptr{Void}}))
9-
cfinal = cfunction(final, Nothing, (Ptr{Void}, Cint, Ptr{Ptr{Void}}))
10-
11-
# TODO: allow the other encodings
12-
enc = SQLITE_UTF8
13-
enc = isdeterm ? enc | SQLITE_DETERMINISTIC : enc
14-
15-
@CHECK db sqlite3_create_function_v2(
16-
db.handle, name, nargs, enc, C_NULL, C_NULL, cstep, cfinal, C_NULL
17-
)
18-
end
19-
201
function sqlvalue(values, i)
212
temp_val_ptr = unsafe_load(values, i)
223
valuetype = sqlite3_value_type(temp_val_ptr)

0 commit comments

Comments
 (0)