sera-2 1.8.1__py3-none-any.whl → 1.8.2__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.
sera/make/make_python_api.py
CHANGED
@@ -4,6 +4,7 @@ from typing import Sequence
|
|
4
4
|
|
5
5
|
from codegen.models import DeferredVar, PredefinedFn, Program, expr, stmt
|
6
6
|
from loguru import logger
|
7
|
+
|
7
8
|
from sera.misc import assert_not_null, to_snake_case
|
8
9
|
from sera.models import App, DataCollection, Module, Package
|
9
10
|
|
@@ -656,7 +657,7 @@ def make_python_create_api(collection: DataCollection, target_pkg: Package):
|
|
656
657
|
func_name,
|
657
658
|
[
|
658
659
|
DeferredVar.simple(
|
659
|
-
"
|
660
|
+
"data",
|
660
661
|
expr.ExprIdent(f"Upsert{cls.name}"),
|
661
662
|
),
|
662
663
|
DeferredVar.simple(
|
@@ -682,7 +683,7 @@ def make_python_create_api(collection: DataCollection, target_pkg: Package):
|
|
682
683
|
"create",
|
683
684
|
[
|
684
685
|
expr.ExprMethodCall(
|
685
|
-
expr.ExprIdent("
|
686
|
+
expr.ExprIdent("data"), "to_db", []
|
686
687
|
),
|
687
688
|
expr.ExprIdent("session"),
|
688
689
|
],
|
@@ -770,7 +771,7 @@ def make_python_update_api(collection: DataCollection, target_pkg: Package):
|
|
770
771
|
expr.ExprIdent(id_type),
|
771
772
|
),
|
772
773
|
DeferredVar.simple(
|
773
|
-
"
|
774
|
+
"data",
|
774
775
|
expr.ExprIdent(f"Upsert{cls.name}"),
|
775
776
|
),
|
776
777
|
DeferredVar.simple(
|
@@ -788,7 +789,7 @@ def make_python_update_api(collection: DataCollection, target_pkg: Package):
|
|
788
789
|
stmt.SingleExprStatement(expr.ExprConstant("Update an existing record")),
|
789
790
|
stmt.SingleExprStatement(
|
790
791
|
PredefinedFn.attr_setter(
|
791
|
-
expr.ExprIdent("
|
792
|
+
expr.ExprIdent("data"),
|
792
793
|
expr.ExprIdent(id_prop.name),
|
793
794
|
expr.ExprIdent("id"),
|
794
795
|
)
|
@@ -803,7 +804,7 @@ def make_python_update_api(collection: DataCollection, target_pkg: Package):
|
|
803
804
|
"update",
|
804
805
|
[
|
805
806
|
expr.ExprMethodCall(
|
806
|
-
expr.ExprIdent("
|
807
|
+
expr.ExprIdent("data"), "to_db", []
|
807
808
|
),
|
808
809
|
expr.ExprIdent("session"),
|
809
810
|
],
|
@@ -9,7 +9,7 @@ sera/libs/dag/_dag.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
sera/make/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
sera/make/__main__.py,sha256=G5O7s6135-708honwqMFn2yPTs06WbGQTHpupID0eZ4,1417
|
11
11
|
sera/make/make_app.py,sha256=n9NtW73O3s_5Q31VHIRmnd-jEIcpDO7ksAsOdovde2s,5999
|
12
|
-
sera/make/make_python_api.py,sha256=
|
12
|
+
sera/make/make_python_api.py,sha256=FcklRwGDGTKPjuhbHKyEog8PYPACi-5DA_nB1ZgxeJU,29424
|
13
13
|
sera/make/make_python_model.py,sha256=xf4revAwVWEnF6QhxbbqPyUGgXOOB--Gu3jPxsESg0Y,36593
|
14
14
|
sera/make/make_python_services.py,sha256=RsinYZdfkrTlTn9CT50VgqGs9w6IZawsJx-KEmqfnEY,2062
|
15
15
|
sera/make/make_typescript_model.py,sha256=8p4rW8VUcBvoMT4a5qxBDDtRWNGKT1TtwLUaVlAQKcE,50313
|
@@ -29,6 +29,6 @@ sera/models/_parse.py,sha256=sJYfQtwek96ltpgxExG4xUbiLnU3qvNYhTP1CeyXGjs,9746
|
|
29
29
|
sera/models/_property.py,sha256=CmEmgOShtSyNFq05YW3tGupwCIVRzPMKudXWld8utPk,5530
|
30
30
|
sera/models/_schema.py,sha256=r-Gqg9Lb_wR3UrbNvfXXgt_qs5bts0t2Ve7aquuF_OI,1155
|
31
31
|
sera/typing.py,sha256=Q4QMfbtfrCjC9tFfsZPhsAnbNX4lm4NHQ9lmjNXYdV0,772
|
32
|
-
sera_2-1.8.
|
33
|
-
sera_2-1.8.
|
34
|
-
sera_2-1.8.
|
32
|
+
sera_2-1.8.2.dist-info/METADATA,sha256=aVLnbP2Vi0Z-Vvaq4jaRgpu8QOjAHUDUsU47JlAwXYQ,856
|
33
|
+
sera_2-1.8.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
34
|
+
sera_2-1.8.2.dist-info/RECORD,,
|
File without changes
|