# Path: pydal/_compat.py
# PY2 = sys.version_info[0] == 2


from .._compat import PY2
    from functools import reduce
)


MONGODB_NONRESERVED = set(("SAFE",))

# remove from here when you add a list.
JDBCSQLITE = SQLITE
DB2 = INFORMIX = INGRES = JDBCPOSTGRESQL = COMMON

ADAPTERS = {
    "sqlite": SQLITE,
    "mysql": MYSQL,
    "postgres": POSTGRESQL,
    "postgres_nonreserved": POSTGRESQL_NONRESERVED,
    "oracle": ORACLE,
    "mssql": MSSQL,
    "mssql2": MSSQL,
    "db2": DB2,
    "informix": INFORMIX,
    "firebird": FIREBIRD,
    "firebird_embedded": FIREBIRD,
    "firebird_nonreserved": FIREBIRD_NONRESERVED,
    "ingres": INGRES,
    "ingresu": INGRES,
    "jdbc:sqlite": JDBCSQLITE,
    "jdbc:postgres": JDBCPOSTGRESQL,
    "common": COMMON,
    "mongodb_nonreserved": MONGODB_NONRESERVED,
}


# Path: pydal/_compat.py
# PY2 = sys.version_info[0] == 2


# Path: pydal/contrib/reserved_sql_keywords.py
from .._compat import PY2
    from functools import reduce

)


MONGODB_NONRESERVED = set(("SAFE",))

# remove from here when you add a list.
JDBCSQLITE = SQLITE
DB2 = INFORMIX = INGRES = JDBCPOSTGRESQL = COMMON

ADAPTERS = {
    "sqlite": SQLITE,
    "mysql": MYSQL,
    "postgres": POSTGRESQL,
    "postgres_nonreserved": POSTGRESQL_NONRESERVED,
    "oracle": ORACLE,
    "mssql": MSSQL,
    "mssql2": MSSQL,
    "db2": DB2,
    "informix": INFORMIX,
    "firebird": FIREBIRD,
    "firebird_embedded": FIREBIRD,
    "firebird_nonreserved": FIREBIRD_NONRESERVED,
    "ingres": INGRES,
    "ingresu": INGRES,
    "jdbc:sqlite": JDBCSQLITE,
    "jdbc:postgres": JDBCPOSTGRESQL,
    "common": COMMON,
    "mongodb_nonreserved": MONGODB_NONRESERVED,
}


ADAPTERS["all"] = reduce(lambda a, b: a.union(b), (x for x in ADAPTERS.values()))