plsqlwks 0.1.1__tar.gz → 0.1.2__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.
Files changed (67) hide show
  1. {plsqlwks-0.1.1/plsqlwks.egg-info → plsqlwks-0.1.2}/PKG-INFO +14 -4
  2. plsqlwks-0.1.1/PKG-INFO → plsqlwks-0.1.2/README.md +7 -20
  3. plsqlwks-0.1.2/license.txt +64 -0
  4. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/__init__.py +1 -1
  5. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/db/__init__.py +24 -0
  6. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/db/editing.py +255 -23
  7. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/db/execution.py +116 -9
  8. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/db/metadata.py +10 -2
  9. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/db/models.py +33 -0
  10. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/sqlsplit.py +2 -1
  11. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/app_db.py +27 -0
  12. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/app_results.py +18 -2
  13. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/results.py +23 -2
  14. plsqlwks-0.1.1/README.md → plsqlwks-0.1.2/plsqlwks.egg-info/PKG-INFO +30 -3
  15. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks.egg-info/SOURCES.txt +1 -0
  16. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/pyproject.toml +8 -1
  17. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/tests/test_db_editing.py +278 -23
  18. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/tests/test_db_helpers.py +101 -1
  19. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/tests/test_oracle_integration.py +198 -7
  20. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/tests/test_packaging.py +55 -12
  21. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/tests/test_sqlsplit.py +13 -0
  22. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/tests/test_ui_flows.py +36 -11
  23. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/tests/test_ui_keys.py +34 -2
  24. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/__main__.py +0 -0
  25. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/config/__init__.py +0 -0
  26. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/config/loader.py +0 -0
  27. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/config/models.py +0 -0
  28. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/config/paths.py +0 -0
  29. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/config/session.py +0 -0
  30. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/config/settings.py +0 -0
  31. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/db/explain.py +0 -0
  32. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/db/health.py +0 -0
  33. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/db/session.py +0 -0
  34. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/db/sql_analysis.py +0 -0
  35. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/db/transactions.py +0 -0
  36. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/sqlbinds.py +0 -0
  37. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/__init__.py +0 -0
  38. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/app.py +0 -0
  39. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/app_editor.py +0 -0
  40. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/app_files.py +0 -0
  41. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/app_input.py +0 -0
  42. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/app_render.py +0 -0
  43. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/app_tabs_browser.py +0 -0
  44. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/browser.py +0 -0
  45. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/buffer.py +0 -0
  46. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/clipboard.py +0 -0
  47. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/commands.py +0 -0
  48. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/completion.py +0 -0
  49. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/constants.py +0 -0
  50. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/display.py +0 -0
  51. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/errors.py +0 -0
  52. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/help.py +0 -0
  53. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/keys.py +0 -0
  54. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/menu.py +0 -0
  55. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/sql.py +0 -0
  56. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/state.py +0 -0
  57. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/ui/syntax.py +0 -0
  58. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks/workspace.py +0 -0
  59. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks.egg-info/dependency_links.txt +0 -0
  60. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks.egg-info/entry_points.txt +0 -0
  61. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks.egg-info/requires.txt +0 -0
  62. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/plsqlwks.egg-info/top_level.txt +0 -0
  63. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/setup.cfg +0 -0
  64. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/tests/test_config_workspace.py +0 -0
  65. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/tests/test_pty_keys.py +0 -0
  66. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/tests/test_rchar.py +0 -0
  67. {plsqlwks-0.1.1 → plsqlwks-0.1.2}/tests/test_sqlbinds.py +0 -0
@@ -1,12 +1,17 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plsqlwks
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: An ncurses SQL and PL/SQL workspace for Oracle databases.
5
+ License-Expression: LicenseRef-plsqlwks-Donationware
6
+ Project-URL: Repository, https://gitlab.com/unununu/plsqlwks
7
+ Project-URL: Issues, https://gitlab.com/unununu/plsqlwks/-/issues
8
+ Project-URL: Changelog, https://gitlab.com/unununu/plsqlwks/-/blob/main/CHANGELOG.md
5
9
  Classifier: Programming Language :: Python :: 3
6
10
  Classifier: Programming Language :: Python :: 3 :: Only
7
11
  Classifier: Topic :: Database
8
12
  Requires-Python: >=3.10
9
13
  Description-Content-Type: text/markdown
14
+ License-File: license.txt
10
15
  Requires-Dist: oracledb>=2.0
11
16
  Provides-Extra: dev
12
17
  Requires-Dist: build>=1.2; extra == "dev"
@@ -14,12 +19,13 @@ Requires-Dist: mypy>=1.10; extra == "dev"
14
19
  Requires-Dist: pytest>=8.0; extra == "dev"
15
20
  Requires-Dist: ruff>=0.8; extra == "dev"
16
21
  Requires-Dist: wheel>=0.43; extra == "dev"
22
+ Dynamic: license-file
17
23
 
18
24
  # plsqlwks
19
25
 
20
26
  An ncurses SQL and PL/SQL workspace for the local Oracle database.
21
27
 
22
- ![PLSQLWKS PREVIEW](https://raw.githubusercontent.com/mtatton/plsqlwks/master/img/preview.gif)
28
+ ![PLSQLWKS PREVIEW](https://gitlab.com/unununu/plsqlwks/-/raw/main/img/preview.png)
23
29
 
24
30
  ## Connection
25
31
 
@@ -57,8 +63,10 @@ For development, install the package in editable mode:
57
63
  python3 -m pip install -e '.[dev]'
58
64
  ```
59
65
 
60
- See [RELEASING.md](RELEASING.md) for the quality, build, wheel-smoke, Oracle,
61
- and tagging checklist used for releases.
66
+ `oracledb` is the only runtime dependency. Supporting functionality uses the Python standard library.
67
+
68
+ See the [release checklist](https://gitlab.com/unununu/plsqlwks/-/blob/main/RELEASING.md)
69
+ for the quality, packaging, and GitLab release process.
62
70
 
63
71
  For a regular local install, use:
64
72
 
@@ -219,6 +227,8 @@ Read-only mode is a client-side guardrail that rejects statements which the SQL
219
227
 
220
228
  When more result rows are available, `PageDown` at the loaded end fetches and appends the next result page. For simple single-table queries that select `ROWID`, press `Enter` on a non-`ROWID` cell to update that table column by rowid. Press `INS` in the grid to prepare a draft row at the top of the grid, edit its cells with `Enter`, use `Ctrl-Alt-C` to insert it, or use `Esc` to cancel it.
221
229
  Database null values are displayed and entered as `<NULL>` in editable results. Plain `NULL` is stored as literal text.
230
+ Grid edits compare the typed value that was originally loaded as well as the `ROWID`. If another session changes or deletes the row first, the edit is rejected and the query must be refreshed. NUMBER input uses decimal notation with a period; DATE and TIMESTAMP input uses ISO `YYYY-MM-DD[ HH:MM:SS[.ffffff]]`; RAW and BLOB input uses hexadecimal bytes. Character and CLOB input is preserved as entered. Types that cannot be compared without losing information, including time-zone timestamps and timestamps with precision above six, are read-only in the grid.
231
+ Displayed CLOB and BLOB values are limited to the first 65,536 characters or bytes and include a truncation marker with the full size. Truncated LOB cells cannot be edited safely. CSV export uses the displayed result values and therefore retains the same explicit LOB limit; schema-browser DDL is always read in full.
222
232
  `F7` cycles a grid fullscreen view that starts with the table header on the first terminal line and uses the last line for data, an editor-only fullscreen view, and a split layout with 2/3 editor and 1/3 data grid.
223
233
 
224
234
  ### Schema Browser
@@ -1,25 +1,8 @@
1
- Metadata-Version: 2.4
2
- Name: plsqlwks
3
- Version: 0.1.1
4
- Summary: An ncurses SQL and PL/SQL workspace for Oracle databases.
5
- Classifier: Programming Language :: Python :: 3
6
- Classifier: Programming Language :: Python :: 3 :: Only
7
- Classifier: Topic :: Database
8
- Requires-Python: >=3.10
9
- Description-Content-Type: text/markdown
10
- Requires-Dist: oracledb>=2.0
11
- Provides-Extra: dev
12
- Requires-Dist: build>=1.2; extra == "dev"
13
- Requires-Dist: mypy>=1.10; extra == "dev"
14
- Requires-Dist: pytest>=8.0; extra == "dev"
15
- Requires-Dist: ruff>=0.8; extra == "dev"
16
- Requires-Dist: wheel>=0.43; extra == "dev"
17
-
18
1
  # plsqlwks
19
2
 
20
3
  An ncurses SQL and PL/SQL workspace for the local Oracle database.
21
4
 
22
- ![PLSQLWKS PREVIEW](https://raw.githubusercontent.com/mtatton/plsqlwks/master/img/preview.gif)
5
+ ![PLSQLWKS PREVIEW](https://gitlab.com/unununu/plsqlwks/-/raw/main/img/preview.png)
23
6
 
24
7
  ## Connection
25
8
 
@@ -57,8 +40,10 @@ For development, install the package in editable mode:
57
40
  python3 -m pip install -e '.[dev]'
58
41
  ```
59
42
 
60
- See [RELEASING.md](RELEASING.md) for the quality, build, wheel-smoke, Oracle,
61
- and tagging checklist used for releases.
43
+ `oracledb` is the only runtime dependency. Supporting functionality uses the Python standard library.
44
+
45
+ See the [release checklist](https://gitlab.com/unununu/plsqlwks/-/blob/main/RELEASING.md)
46
+ for the quality, packaging, and GitLab release process.
62
47
 
63
48
  For a regular local install, use:
64
49
 
@@ -219,6 +204,8 @@ Read-only mode is a client-side guardrail that rejects statements which the SQL
219
204
 
220
205
  When more result rows are available, `PageDown` at the loaded end fetches and appends the next result page. For simple single-table queries that select `ROWID`, press `Enter` on a non-`ROWID` cell to update that table column by rowid. Press `INS` in the grid to prepare a draft row at the top of the grid, edit its cells with `Enter`, use `Ctrl-Alt-C` to insert it, or use `Esc` to cancel it.
221
206
  Database null values are displayed and entered as `<NULL>` in editable results. Plain `NULL` is stored as literal text.
207
+ Grid edits compare the typed value that was originally loaded as well as the `ROWID`. If another session changes or deletes the row first, the edit is rejected and the query must be refreshed. NUMBER input uses decimal notation with a period; DATE and TIMESTAMP input uses ISO `YYYY-MM-DD[ HH:MM:SS[.ffffff]]`; RAW and BLOB input uses hexadecimal bytes. Character and CLOB input is preserved as entered. Types that cannot be compared without losing information, including time-zone timestamps and timestamps with precision above six, are read-only in the grid.
208
+ Displayed CLOB and BLOB values are limited to the first 65,536 characters or bytes and include a truncation marker with the full size. Truncated LOB cells cannot be edited safely. CSV export uses the displayed result values and therefore retains the same explicit LOB limit; schema-browser DDL is always read in full.
222
209
  `F7` cycles a grid fullscreen view that starts with the table header on the first terminal line and uses the last line for data, an editor-only fullscreen view, and a split layout with 2/3 editor and 1/3 data grid.
223
210
 
224
211
  ### Schema Browser
@@ -0,0 +1,64 @@
1
+ plsqlwks Donationware License v1.0
2
+
3
+ Copyright (c) 2026 unununu
4
+
5
+ This license applies to the plsqlwks application source code and to original
6
+ materials created by the copyright holder, except where a file, directory, or
7
+ notice states otherwise.
8
+
9
+ 1. Permission
10
+
11
+ Permission is hereby granted to any person obtaining a copy of this software and
12
+ associated documentation files (the "Software") to use, copy, modify, merge,
13
+ publish, distribute, and sublicense the Software, for personal, educational,
14
+ internal business, and commercial purposes, subject to the conditions below.
15
+
16
+ 2. Donation Request
17
+
18
+ The Software is provided as donationware. You are encouraged, but not required,
19
+ to make a voluntary donation to support continued development, maintenance, and
20
+ support of plsqlwks.
21
+
22
+ A donation is a request for support and is not a condition of the rights granted
23
+ under this license.
24
+
25
+ 3. Conditions
26
+
27
+ The above copyright notice and this permission notice shall be included in all
28
+ copies or substantial portions of the Software.
29
+
30
+ If you distribute modified versions of the Software, you must clearly indicate
31
+ that changes were made and must not misrepresent the modified version as the
32
+ original plsqlwks release.
33
+
34
+ 4. Third-party Content and Data
35
+
36
+ This license does not grant rights to any third-party code, trademarks,
37
+ databases, images, brand assets, or other content that may be bundled with or
38
+ referenced by the Software, except as explicitly stated by their respective
39
+ owners.
40
+
41
+ If plsqlwks includes or uses third-party data, that data remains subject to its
42
+ own license and attribution requirements. You are responsible for complying with
43
+ those separate terms.
44
+
45
+ 5. Trademarks
46
+
47
+ This license does not grant permission to use the names "plsqlwks" or the names,
48
+ logos, or trademarks of the copyright holder, except as reasonably necessary to
49
+ identify the Software.
50
+
51
+ 6. No Warranty
52
+
53
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
54
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
55
+ FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE
56
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
57
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM,
58
+ OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
59
+ SOFTWARE.
60
+
61
+ 7. Acceptance
62
+
63
+ By using, copying, modifying, or distributing the Software, you agree to the
64
+ terms of this license.
@@ -1,3 +1,3 @@
1
1
  """ncurses SQL and PL/SQL workspace."""
2
2
 
3
- __version__ = "0.1.1"
3
+ __version__ = "0.1.2"
@@ -12,6 +12,8 @@ from .editing import (
12
12
  TAIL_SINGLE_WORD_REJECTIONS,
13
13
  EditingMixin,
14
14
  build_editable_result_context,
15
+ convert_edit_value,
16
+ edit_metadata_rejection_reason,
15
17
  normalize_edit_value,
16
18
  normalize_identifier,
17
19
  parse_select_item,
@@ -26,15 +28,20 @@ from .execution import (
26
28
  ORACLE_IDENTIFIER_TOKEN_RE,
27
29
  ORACLE_QUALIFIED_IDENTIFIER_RE,
28
30
  ExecutionMixin,
31
+ LOB_DISPLAY_LIMIT,
32
+ column_metadata_from_description,
29
33
  csv_cell,
30
34
  execute_user_statement,
31
35
  fetch_plsql_compile_diagnostics,
32
36
  format_result_rows,
33
37
  format_value,
38
+ materialize_result_rows,
39
+ materialize_result_value,
34
40
  normalize_oracle_identifier,
35
41
  oracle_identifier_parts,
36
42
  plsql_compilation_error,
37
43
  plsql_object_from_create_statement,
44
+ read_lob_value,
38
45
  )
39
46
  from .explain import (
40
47
  ExplainMixin,
@@ -61,6 +68,8 @@ from .models import (
61
68
  DBMS_OUTPUT_FETCH_LINES,
62
69
  DBMS_OUTPUT_LINE_SIZE,
63
70
  NULL_DISPLAY_TOKEN,
71
+ CellUpdateResult,
72
+ ConcurrentEditError,
64
73
  EditOperationRollbackError,
65
74
  EditableResultContext,
66
75
  ExplainPlanCleanupError,
@@ -74,9 +83,12 @@ from .models import (
74
83
  QueryResultContinuation,
75
84
  QueryResultPage,
76
85
  ReadOnlyModeError,
86
+ ResultColumnMetadata,
87
+ RowInsertResult,
77
88
  SelectItem,
78
89
  SimpleSelect,
79
90
  TransactionReport,
91
+ TruncatedLobValue,
80
92
  format_compilation_error,
81
93
  format_compile_diagnostic,
82
94
  )
@@ -115,9 +127,12 @@ __all__ = [
115
127
  "DDL_KEYWORDS",
116
128
  "DIRECT_DML_KEYWORDS",
117
129
  "EditOperationRollbackError",
130
+ "CellUpdateResult",
131
+ "ConcurrentEditError",
118
132
  "EditableResultContext",
119
133
  "EditingMixin",
120
134
  "ExecutionMixin",
135
+ "LOB_DISPLAY_LIMIT",
121
136
  "ExplainMixin",
122
137
  "ExplainPlanCleanupError",
123
138
  "ExplainPlanResult",
@@ -140,6 +155,8 @@ __all__ = [
140
155
  "QueryResultContinuation",
141
156
  "QueryResultPage",
142
157
  "ReadOnlyModeError",
158
+ "ResultColumnMetadata",
159
+ "RowInsertResult",
143
160
  "SCHEMA_OBJECT_TYPES",
144
161
  "SelectItem",
145
162
  "SimpleSelect",
@@ -148,14 +165,18 @@ __all__ = [
148
165
  "TAIL_SINGLE_WORD_REJECTIONS",
149
166
  "TransactionMixin",
150
167
  "TransactionReport",
168
+ "TruncatedLobValue",
151
169
  "assemble_package_definition",
152
170
  "build_editable_result_context",
171
+ "column_metadata_from_description",
153
172
  "clean_ddl",
154
173
  "configure_metadata_transform",
155
174
  "connection_transaction_in_progress",
175
+ "convert_edit_value",
156
176
  "csv_cell",
157
177
  "edit_operation_savepoint",
158
178
  "empty_schema_object_groups",
179
+ "edit_metadata_rejection_reason",
159
180
  "ensure_sql_terminator",
160
181
  "execute_user_statement",
161
182
  "explain_plan_savepoint",
@@ -171,6 +192,8 @@ __all__ = [
171
192
  "is_oracle_identifier_char",
172
193
  "leading_sql_keyword",
173
194
  "metadata_object_type",
195
+ "materialize_result_rows",
196
+ "materialize_result_value",
174
197
  "normalize_edit_value",
175
198
  "normalize_identifier",
176
199
  "normalize_oracle_identifier",
@@ -185,6 +208,7 @@ __all__ = [
185
208
  "plsql_compilation_error",
186
209
  "plsql_object_from_create_statement",
187
210
  "read_only_rejection_reason",
211
+ "read_lob_value",
188
212
  "read_password",
189
213
  "rollback_explain_plan_savepoint",
190
214
  "scalar_var_value",