Python 如何在SQLAlchemy上声明Postgres函数?
我在使用炼金术,我的桌子/模型的结构如下Python 如何在SQLAlchemy上声明Postgres函数?,python,postgresql,orm,sqlalchemy,flask-sqlalchemy,Python,Postgresql,Orm,Sqlalchemy,Flask Sqlalchemy,我在使用炼金术,我的桌子/模型的结构如下 class TableName (db.Model): columnname = db.Column(db.String) 如何在那里插入Postgres自定义函数,以便SQLAlchemy了解它 我指的是像这样的函数 create function canonicalize (text) returns text as $$ select $1; $$ language sql;
class TableName (db.Model):
columnname = db.Column(db.String)
如何在那里插入Postgres自定义函数,以便SQLAlchemy了解它
我指的是像这样的函数
create function canonicalize (text) returns text as $$
select $1;
$$ language sql;