home / github / issue_comments

Menu
  • GraphQL API

issue_comments: 982048918

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/sqlite-utils/issues/344#issuecomment-982048918 https://api.github.com/repos/simonw/sqlite-utils/issues/344 982048918 IC_kwDOCGYnMM46iOCW 9599 2021-11-29T21:40:42Z 2021-11-29T21:40:42Z OWNER Here's a function that detects if `strict` is supported or not: ```python import secrets import sqlite3 def supports_strict_tables(db = None): if db is None: db = sqlite3.connect(":memory:") try: table_name = 't{}'.format(secrets.token_hex(16)) with db: db.execute("create table {} (name text) strict".format(table_name)) db.execute("drop table {}".format(table_name)) return True except: return False ``` {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 1066474200  
Powered by Datasette · Queries took 0.947ms