Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Support for SQLite UDFs? #134

Open
jonnickerson opened this issue Feb 3, 2019 · 1 comment
Open

Question: Support for SQLite UDFs? #134

jonnickerson opened this issue Feb 3, 2019 · 1 comment

Comments

@jonnickerson
Copy link

jonnickerson commented Feb 3, 2019

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])
@edublancas
Copy link

this is supported beginning in version 0.5.1 of our fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants