MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / _sqlite_partial_idx

Method _sqlite_partial_idx

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

Source from the content-addressed store, hash-verified

1252 return only_on(self._sqlite_memory_db)
1253
1254 def _sqlite_partial_idx(self, config):
1255 if not against(config, "sqlite"):
1256 return False
1257 else:
1258 with config.db.connect() as conn:
1259 connection = conn.connection
1260 cursor = connection.cursor()
1261 try:
1262 cursor.execute("SELECT * FROM pragma_index_info('idx52')")
1263 except:
1264 return False
1265 else:
1266 return (
1267 cursor.description is not None
1268 and len(cursor.description) >= 3
1269 )
1270 finally:
1271 cursor.close()
1272
1273 @property
1274 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