Для этого я использую что-то вроде:
Код: Выделить всё
sql = 'CREATE USER :username WITH PASSWORD :passwd'
sql_data = {
"username": "the_user_name",
"passwd": "the_password",
}
request.db.execute(sql, sql_data)
Код: Выделить всё
CREATE USER 'the_user_name' WITH PASSWORD 'the_password'
Код: Выделить всё
CREATE USER "the_user_name" WITH PASSWORD 'the_password'
Подробнее здесь: https://stackoverflow.com/questions/399 ... sqlalchemy
Мобильная версия