qodalis-cli-server-plugin-data-explorer-sql 1.0.0b24__tar.gz → 1.0.0b26__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: qodalis-cli-server-plugin-data-explorer-sql
3
- Version: 1.0.0b24
3
+ Version: 1.0.0b26
4
4
  Summary: SQLite Data Explorer provider plugin for Qodalis CLI servers
5
5
  Project-URL: Homepage, https://github.com/qodalis-solutions/cli-server-python
6
6
  Project-URL: Repository, https://github.com/qodalis-solutions/cli-server-python
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "qodalis-cli-server-plugin-data-explorer-sql"
7
- version = "1.0.0b24"
7
+ version = "1.0.0b26"
8
8
  description = "SQLite Data Explorer provider plugin for Qodalis CLI servers"
9
9
  readme = { text = "", content-type = "text/plain" }
10
10
  license = "MIT"
@@ -31,6 +31,11 @@ class SqlDataExplorerProvider(IDataExplorerProvider):
31
31
  try:
32
32
  conn = sqlite3.connect(self._filename)
33
33
  conn.row_factory = sqlite3.Row
34
+ # Read-only sources (the default): SQLite refuses every write on
35
+ # this connection (read with getattr: older abstractions have no
36
+ # read_only option)
37
+ if getattr(context.options, "read_only", True) is not False:
38
+ conn.execute("PRAGMA query_only = ON")
34
39
  cursor = conn.cursor()
35
40
  cursor.execute(context.query, context.parameters or {})
36
41