def does_type_exist(self, type_name):
"""
Check if a composite type exists in the database
"""
sql = 'select exists (select 1 from pg_type where typname = %s);'
with connection.cursor() as cursor:
cursor.execute(sql, [type_name])
row = cursor.fetchone()
return row[0]
test_field.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录