MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / get_sql

Method get_sql

tortoise/fields/db_defaults.py:89–92  ·  view source on GitHub ↗
(self, _context=None, dialect: str | None = None)

Source from the content-addressed store, hash-verified

87 super().__init__(self._DIALECT_SQL["sqlite"])
88
89 def get_sql(self, _context=None, dialect: str | None = None) -> str:
90 if dialect and dialect in self._DIALECT_SQL:
91 return self._DIALECT_SQL[dialect]
92 return self.sql
93
94 def __repr__(self) -> str:
95 return "RandomHex()"

Calls

no outgoing calls