sqlite-utils query --functions mechanism for registering extra functions
See original GitHub issueIt would be really cool if you could register additional custom SQL functions for use with the sqlite-utils query
command - something like this:
sqlite-utils data.db 'update images set domain = extract_domain(url)' --functions '
from urllib.parse import urlparse
def extract_domain(url):
return urlparse(url).netloc
'
Every function defined in that code block would be registered with the connection, unless the name began with an underscore.
Issue Analytics
- State:
- Created a year ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
sqlite_utils Python library - sqlite-utils - Datasette
SQLite supports registering custom SQL functions written in Python. The db.register_function() method lets you register these functions, and keeps track of ...
Read more >sqlite-utils documentation - Datasette
Python utility functions for manipulating SQLite databases. This library and command-line utility helps create SQLite databases from an ...
Read more >sqlite-utils documentation
Python utility functions for manipulating SQLite databases. This library and command-line utility helps create SQLite databases from an ...
Read more >sqlite-utils command-line tool
You can use the --functions option to pass a block of Python code that defines additional functions which can then be called by...
Read more >sqlite-utils documentation - Datasette
Python utility functions for manipulating SQLite databases. This library and command-line utility helps create SQLite databases from an ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Testing
bulk --functions
:Not sure what you mean here?