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
@@ -48,7 +48,7 @@ class Stricklers(SQLSubModel):
|
||||
self._medium = medium
|
||||
|
||||
@classmethod
|
||||
def _sql_create(cls, execute):
|
||||
def _db_create(cls, execute):
|
||||
execute("""
|
||||
CREATE TABLE stricklers(
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
@@ -62,11 +62,11 @@ class Stricklers(SQLSubModel):
|
||||
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):
|
||||
stricklers = []
|
||||
status = data["status"]
|
||||
|
||||
@@ -97,14 +97,14 @@ class Stricklers(SQLSubModel):
|
||||
|
||||
return stricklers
|
||||
|
||||
def _sql_save(self, execute, data=None):
|
||||
def _db_save(self, execute, data=None):
|
||||
sql = (
|
||||
"INSERT INTO " +
|
||||
"stricklers(id, name, comment, minor, medium) " +
|
||||
"VALUES (" +
|
||||
f"{self.id}, " +
|
||||
f"'{self._sql_format(self.name)}', " +
|
||||
f"'{self._sql_format(self.comment)}', " +
|
||||
f"'{self._db_format(self.name)}', " +
|
||||
f"'{self._db_format(self.comment)}', " +
|
||||
f"{float(self.minor)}, {float(self.medium)}" +
|
||||
")"
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user