sqlmesh 0.188.2.dev14__py3-none-any.whl → 0.188.2.dev15__py3-none-any.whl
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.
- sqlmesh/_version.py +2 -2
- sqlmesh/lsp/main.py +42 -0
- {sqlmesh-0.188.2.dev14.dist-info → sqlmesh-0.188.2.dev15.dist-info}/METADATA +1 -1
- {sqlmesh-0.188.2.dev14.dist-info → sqlmesh-0.188.2.dev15.dist-info}/RECORD +8 -8
- {sqlmesh-0.188.2.dev14.dist-info → sqlmesh-0.188.2.dev15.dist-info}/WHEEL +0 -0
- {sqlmesh-0.188.2.dev14.dist-info → sqlmesh-0.188.2.dev15.dist-info}/entry_points.txt +0 -0
- {sqlmesh-0.188.2.dev14.dist-info → sqlmesh-0.188.2.dev15.dist-info}/licenses/LICENSE +0 -0
- {sqlmesh-0.188.2.dev14.dist-info → sqlmesh-0.188.2.dev15.dist-info}/top_level.txt +0 -0
sqlmesh/_version.py
CHANGED
|
@@ -17,5 +17,5 @@ __version__: str
|
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
|
18
18
|
version_tuple: VERSION_TUPLE
|
|
19
19
|
|
|
20
|
-
__version__ = version = '0.188.2.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 188, 2, '
|
|
20
|
+
__version__ = version = '0.188.2.dev15'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 188, 2, 'dev15')
|
sqlmesh/lsp/main.py
CHANGED
|
@@ -20,6 +20,7 @@ from sqlmesh.lsp.api import (
|
|
|
20
20
|
ApiResponseGetLineage,
|
|
21
21
|
ApiResponseGetModels,
|
|
22
22
|
)
|
|
23
|
+
from sqlmesh.lsp.completions import get_sql_completions
|
|
23
24
|
from sqlmesh.lsp.context import (
|
|
24
25
|
LSPContext,
|
|
25
26
|
ModelTarget,
|
|
@@ -456,6 +457,47 @@ class SQLMeshLanguageServer:
|
|
|
456
457
|
)
|
|
457
458
|
return types.WorkspaceDiagnosticReport(items=[])
|
|
458
459
|
|
|
460
|
+
@self.server.feature(types.TEXT_DOCUMENT_COMPLETION)
|
|
461
|
+
def completion(
|
|
462
|
+
ls: LanguageServer, params: types.CompletionParams
|
|
463
|
+
) -> t.Optional[types.CompletionList]:
|
|
464
|
+
"""Handle completion requests from the client."""
|
|
465
|
+
try:
|
|
466
|
+
uri = URI(params.text_document.uri)
|
|
467
|
+
context = self._context_get_or_load(uri)
|
|
468
|
+
|
|
469
|
+
# Get completions using the existing completions module
|
|
470
|
+
completion_response = context.get_autocomplete(uri)
|
|
471
|
+
|
|
472
|
+
completion_items = []
|
|
473
|
+
# Add model completions
|
|
474
|
+
for model in completion_response.models:
|
|
475
|
+
completion_items.append(
|
|
476
|
+
types.CompletionItem(
|
|
477
|
+
label=model,
|
|
478
|
+
kind=types.CompletionItemKind.Reference,
|
|
479
|
+
detail="SQLMesh Model",
|
|
480
|
+
)
|
|
481
|
+
)
|
|
482
|
+
# Add keyword completions
|
|
483
|
+
for keyword in completion_response.keywords:
|
|
484
|
+
completion_items.append(
|
|
485
|
+
types.CompletionItem(
|
|
486
|
+
label=keyword,
|
|
487
|
+
kind=types.CompletionItemKind.Keyword,
|
|
488
|
+
detail="SQL Keyword",
|
|
489
|
+
)
|
|
490
|
+
)
|
|
491
|
+
|
|
492
|
+
return types.CompletionList(
|
|
493
|
+
is_incomplete=False,
|
|
494
|
+
items=completion_items,
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
except Exception as e:
|
|
498
|
+
get_sql_completions(None, URI(params.text_document.uri))
|
|
499
|
+
return None
|
|
500
|
+
|
|
459
501
|
def _get_diagnostics_for_uri(self, uri: URI) -> t.Tuple[t.List[types.Diagnostic], int]:
|
|
460
502
|
"""Get diagnostics for a specific URI, returning (diagnostics, result_id).
|
|
461
503
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
sqlmesh/__init__.py,sha256=69xw6bTmi4cW90M-sl3g6wLDgxVcLHcKg1q8GS3lqyA,7466
|
|
2
|
-
sqlmesh/_version.py,sha256=
|
|
2
|
+
sqlmesh/_version.py,sha256=5V6RThYieKvhs1-zZRT5s0rxTu0pvS4PDHWDF3R6B_A,530
|
|
3
3
|
sqlmesh/magics.py,sha256=fu7-OeT_0_TAkWZOLoiioE3-3iFpvTRxFCbQUlRnfuw,39944
|
|
4
4
|
sqlmesh/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
sqlmesh/cicd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -160,7 +160,7 @@ sqlmesh/lsp/completions.py,sha256=Ufe5XyqmT8ttXqQDbhH2RtuGC0cVuVfSnGqDMl6KmB4,36
|
|
|
160
160
|
sqlmesh/lsp/context.py,sha256=ozkrw-897_Scbbn4AnKdeTQhrUb0CI0e34vcV-5U2DA,6158
|
|
161
161
|
sqlmesh/lsp/custom.py,sha256=Mml6V1nYAHdP4Zt8gxly1ZLKYALtxGeAVzPrrYpc7m8,1426
|
|
162
162
|
sqlmesh/lsp/description.py,sha256=4QIGC9ix8IzmWF6DVUNhY4m1Crk3sNQA6hZ1RbyqU78,827
|
|
163
|
-
sqlmesh/lsp/main.py,sha256=
|
|
163
|
+
sqlmesh/lsp/main.py,sha256=N8PmNdMcg87shZtThQSbF198KpSj2FU_48-LtGGj6bw,30628
|
|
164
164
|
sqlmesh/lsp/reference.py,sha256=-HkMMzRzq4ike5mSkoWajanYNMAwhQhlPaqw62451ac,16887
|
|
165
165
|
sqlmesh/lsp/uri.py,sha256=mvSLbZGmMTHPpliThOtVWiFcHnfJzp1w39q9l-xD2SI,802
|
|
166
166
|
sqlmesh/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -270,7 +270,7 @@ sqlmesh/utils/pydantic.py,sha256=I898jAFqa3qU6lG2uPpRebVFncOUo8ZrLWM_R3K3DHU,116
|
|
|
270
270
|
sqlmesh/utils/rich.py,sha256=xNZyPCqEc4TAlJlsEthg-5eYUWpaizz0QjBzO7a1Yv4,1509
|
|
271
271
|
sqlmesh/utils/windows.py,sha256=r7Yin4WEwbvH7sKA3hOJtRsclmscNuBeCklCfVPvtQs,611
|
|
272
272
|
sqlmesh/utils/yaml.py,sha256=np-WVcwmwsKghCgAj1OBBMsK1SXSRn4wR-H37cGiFr8,2282
|
|
273
|
-
sqlmesh-0.188.2.
|
|
273
|
+
sqlmesh-0.188.2.dev15.dist-info/licenses/LICENSE,sha256=OlMefUjgWJdULtf84BLW0AZZcY8DwdgQqb_1j2862j8,11346
|
|
274
274
|
web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
275
275
|
web/client/dist/index.html,sha256=U9DgO3KqjoSuGiKVKR8AAdfXFUa0kaXJgIRAsmZ5RH8,5472
|
|
276
276
|
web/client/dist/assets/Audits-CNkn30Bu.js,sha256=0uC1ibXDFzBjPRshILFo9VzNNKHT3nvIgQhrhVDG-1Y,1041
|
|
@@ -388,8 +388,8 @@ web/server/api/endpoints/models.py,sha256=ud-lRwriyI_OYg9tZchrBgeiXELiRTLNEodraf
|
|
|
388
388
|
web/server/api/endpoints/modules.py,sha256=8hqqgonGay_mJmpCw0IdbjsPhWlQH2VLdKAqha-myac,468
|
|
389
389
|
web/server/api/endpoints/plan.py,sha256=OYuQ_4dgbhG9ibTcX1a8mvYgH3ANxw9Fhbb4wg6QWqc,9222
|
|
390
390
|
web/server/api/endpoints/table_diff.py,sha256=Wd5YxeKbZB7AkrDvqFgvV9ZQlnKYOF1n5W_w2EHE_Zw,2085
|
|
391
|
-
sqlmesh-0.188.2.
|
|
392
|
-
sqlmesh-0.188.2.
|
|
393
|
-
sqlmesh-0.188.2.
|
|
394
|
-
sqlmesh-0.188.2.
|
|
395
|
-
sqlmesh-0.188.2.
|
|
391
|
+
sqlmesh-0.188.2.dev15.dist-info/METADATA,sha256=ObyV4n-OfG2l8tfCwlw0h_R3LYG72V453Wr36H2vkc8,26532
|
|
392
|
+
sqlmesh-0.188.2.dev15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
393
|
+
sqlmesh-0.188.2.dev15.dist-info/entry_points.txt,sha256=pIYKtg-u-uO7BK_Y0qrdmfyj0bYrcMc3Xiqr5WE3VFk,121
|
|
394
|
+
sqlmesh-0.188.2.dev15.dist-info/top_level.txt,sha256=bspjo5vjELQkuN0qKuTFIbsrUt3Zeo8D2mlKeHG1LdE,12
|
|
395
|
+
sqlmesh-0.188.2.dev15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|