| 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): |