How to use the pydal.dialects.sqltype_for function in pydal

To help you get started, we’ve selected a few pydal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github web2py / pydal / pydal / dialects / sqlite.py View on Github external
    @sqltype_for("double")
    def type_double(self):
        return self.types["float"]
github web2py / pydal / pydal / dialects / base.py View on Github external
    @sqltype_for("blob")
    def type_blob(self):
        return self.types["text"]
github web2py / pydal / pydal / dialects / teradata.py View on Github external
    @sqltype_for("reference TFK")
    def type_reference_tfk(self):
        return (
            " FOREIGN KEY (%(field_name)s) REFERENCES %(foreign_table)s"
            + " (%(foreign_key)s)"
        )
github web2py / pydal / pydal / dialects / base.py View on Github external
    @sqltype_for("string")
    def type_string(self):
        return str
github web2py / pydal / pydal / dialects / base.py View on Github external
    @sqltype_for("date")
    def type_date(self):
        return "DATE"
github web2py / pydal / pydal / dialects / oracle.py View on Github external
    @sqltype_for("double")
    def type_float(self):
        return "BINARY_DOUBLE"
github web2py / pydal / pydal / dialects / postgre.py View on Github external
    @sqltype_for('list:reference')
    def type_list_reference(self):
        return 'BIGINT[]'
github web2py / pydal / pydal / dialects / mysql.py View on Github external
    @sqltype_for("datetime")
    def type_datetime(self):
        return "DATETIME"
github web2py / pydal / pydal / dialects / ingres.py View on Github external
    @sqltype_for("big-id")
    def type_big_id(self):
        return (
            "bigint not null unique with default next value for %s"
            % self.INGRES_SEQNAME
        )
github web2py / pydal / pydal / dialects / mysql.py View on Github external
    @sqltype_for("text")
    def type_text(self):
        return "LONGTEXT"

pydal

pyDAL is a Database Abstraction Layer. It generates queries for SQlite, PotsgreSQL, MySQL, and other backends. It was originally part of the web2py frameworks but it is now an independent project. Example: db.define_table("thing",Field("name")) and db.thing.insert(name="Pizza")

BSD-3-Clause
Latest version published 11 days ago

Package Health Score

78 / 100
Full package analysis