61
61
macro register (db, func)
62
62
:(register ($ (esc (db)), $ (esc (func))))
63
63
end
64
- # User-facing method with keyword arguments for registering a function
65
- # to be used within SQLite
66
- function register (db:: SQLiteDB , func:: Function ; nargs:: Int = - 1 , isdeterm:: Bool = true , name:: String = string (func))
67
- register (db, func, nargs, isdeterm, name)
68
- end
69
64
# User-facing method for registering a Julia function to be used within SQLite
70
- function register (db:: SQLiteDB , func:: Function , nargs:: Int = - 1 , isdeterm :: Bool = true , name:: String = string (func))
65
+ function register (db:: SQLiteDB , func:: Function ; nargs:: Int = - 1 , name:: AbstractString = string (func), isdeterm :: Bool = true )
71
66
@assert nargs <= 127 " use -1 if > 127 arguments are needed"
72
67
# assume any negative number means a varargs function
73
68
nargs < - 1 && (nargs = - 1 )
@@ -86,6 +81,6 @@ function register(db::SQLiteDB, func::Function, nargs::Int=-1, isdeterm::Bool=tr
86
81
end
87
82
88
83
# annotate types because the MethodError makes more sense that way
89
- regexp (r:: String , s:: String ) = ismatch (Regex (r), s)
84
+ regexp (r:: AbstractString , s:: AbstractString ) = ismatch (Regex (r), s)
90
85
# macro for preserving the special characters in a string
91
86
macro sr_str (s) s end
0 commit comments