mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
Fixed incorrect register_function code example
This commit is contained in:
parent
77ca051d4f
commit
bfbe69646e
1 changed files with 2 additions and 2 deletions
|
|
@ -373,13 +373,13 @@ class Database:
|
|||
``fn`` will be made available as a function within SQL, with the same name and number
|
||||
of arguments. Can be used as a decorator::
|
||||
|
||||
@db.register
|
||||
@db.register_function
|
||||
def upper(value):
|
||||
return str(value).upper()
|
||||
|
||||
The decorator can take arguments::
|
||||
|
||||
@db.register(deterministic=True, replace=True)
|
||||
@db.register_function(deterministic=True, replace=True)
|
||||
def upper(value):
|
||||
return str(value).upper()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue