ipython-sql
ipython-sql copied to clipboard
Question: Support for SQLite UDFs?
Hello, first off I absolutely love your work here.
But is there any existing support for creating custom SQLite functions or could it be added?
Example:
from sqlalchemy import create_engine
conn = create_engine('sqlite://')
conn.execute('create table test(example_txt_col text)')
conn.execute("insert into test values ('example text')")
def to_upper(txt):
return txt.upper()
connection = conn.raw_connection()
connection.create_function('to_upper', 1, to_upper)
print(conn.execute("select to_upper(example_txt_col) words from test").fetchall()[0][0])
this is supported beginning in version 0.5.1 of our fork