MCPcopy Create free account
hub / github.com/Freedium-cfd/web / enable_zstd

Method enable_zstd

database-lib/database_lib/main.py:153–164  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

151 return [CacheResponse(key, value) for key, value in self.cursor]
152
153 def enable_zstd(self):
154 self.ensure_connection()
155 with self.connection:
156 try:
157 self.cursor.execute(
158 'SELECT zstd_enable_transparent(\'{"table": "cache", "column": "value", "compression_level": 9, "dict_chooser": "\'\'a\'\'"}\')'
159 )
160 except Exception as error:
161 logger.error(f"Error enabling ZSTD compression: {error}")
162 logger.exception(error)
163
164 self.connection.execute("PRAGMA auto_vacuum=full")
165
166 def init_db(self):
167 self.ensure_connection()

Callers 2

connectMethod · 0.95
setUpClassMethod · 0.80

Calls 2

ensure_connectionMethod · 0.95
errorMethod · 0.80

Tested by 1

setUpClassMethod · 0.64