MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _sqlite_partial_idx

Method _sqlite_partial_idx

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

Source from the content-addressed store, hash-verified

1326 return only_on(self._sqlite_file_db)
1327
1328 def _sqlite_partial_idx(self, config):
1329 if not against(config, "sqlite"):
1330 return False
1331 else:
1332 with config.db.connect() as conn:
1333 connection = conn.connection
1334 cursor = connection.cursor()
1335 try:
1336 cursor.execute("SELECT * FROM pragma_index_info('idx52')")
1337 except:
1338 return False
1339 else:
1340 return (
1341 cursor.description is not None
1342 and len(cursor.description) >= 3
1343 )
1344 finally:
1345 cursor.close()
1346
1347 @property
1348 def sqlite_partial_indexes(self):

Callers

nothing calls this directly

Calls 5

againstFunction · 0.90
connectMethod · 0.45
cursorMethod · 0.45
executeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected