MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _sqlite_json

Method _sqlite_json

test/requirements.py:1300–1314  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

1298 ) and not config.db.dialect._is_url_file_db(config.db.url)
1299
1300 def _sqlite_json(self, config):
1301 if not against(config, "sqlite >= 3.9"):
1302 return False
1303 else:
1304 with config.db.connect() as conn:
1305 try:
1306 return (
1307 conn.exec_driver_sql(
1308 """select json_extract('{"foo": "bar"}', """
1309 """'$."foo"')"""
1310 ).scalar()
1311 == "bar"
1312 )
1313 except exc.DBAPIError:
1314 return False
1315
1316 @property
1317 def sqlite_jsonb(self):

Callers 1

Calls 4

againstFunction · 0.90
connectMethod · 0.45
scalarMethod · 0.45
exec_driver_sqlMethod · 0.45

Tested by

no test coverage detected