mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pamhyr: Rename '_sql_*' function to '_db_*'.
This commit is contained in:
1 parent
8d92fbbdac
commit
ea2dbfba3e
23 files changed
+186
-186
No files matched your search
@@ -52,25 +52,25 @@ class Reach(SQLSubModel):
|
||||
self._guidelines = {}
|
||||
|
||||
@classmethod
|
||||
def _sql_create(cls, execute):
|
||||
def _db_create(cls, execute):
|
||||
return cls._create_submodel(execute)
|
||||
|
||||
@classmethod
|
||||
def _sql_update(cls, execute, version):
|
||||
def _db_update(cls, execute, version):
|
||||
return cls._update_submodel(execute, version)
|
||||
|
||||
@classmethod
|
||||
def _sql_load(cls, execute, data=None):
|
||||
def _db_load(cls, execute, data=None):
|
||||
new = cls(status=data["status"], parent=data["parent"])
|
||||
|
||||
new._profiles = ProfileXYZ._sql_load(
|
||||
new._profiles = ProfileXYZ._db_load(
|
||||
execute,
|
||||
data=data
|
||||
)
|
||||
|
||||
return new
|
||||
|
||||
def _sql_save(self, execute, data=None):
|
||||
def _db_save(self, execute, data=None):
|
||||
# Delete old data
|
||||
execute(f"DELETE FROM geometry_profileXYZ WHERE reach = {self.id}")
|
||||
# execute(f"DELETE FROM geometry_pointXYZ")
|
||||
@@ -81,7 +81,7 @@ class Reach(SQLSubModel):
|
||||
ind = 0
|
||||
for profile in self.profiles:
|
||||
data["ind"] = ind
|
||||
profile._sql_save(execute, data)
|
||||
profile._db_save(execute, data)
|
||||
ind += 1
|
||||
|
||||
return True
|
||||
|
||||
Reference in new issue
Block a user