├── .coveragerc ├── .github └── workflows │ └── .cov.yml ├── .gitignore ├── .python-version ├── LICENSE ├── README.md ├── pyproject.toml ├── pytest.ini ├── src └── sqlmodelgen │ ├── __init__.py │ ├── codegen │ ├── cir_to_full_ast │ │ ├── code_ir_to_ast.py │ │ └── to_ast_imports.py │ ├── code_ir │ │ ├── build_cir.py │ │ ├── build_col_attrs.py │ │ ├── build_common.py │ │ ├── build_rels.py │ │ ├── build_table_args.py │ │ └── code_ir.py │ ├── codegen.py │ └── convert_data_type.py │ ├── ir │ ├── ir.py │ ├── mysql │ │ └── __init__.py │ ├── parse │ │ ├── ir_parse.py │ │ └── org_parse.py │ ├── postgres │ │ └── postgres_collect.py │ ├── query │ │ └── __init__.py │ └── sqlite │ │ └── sqlite_parse.py │ ├── sqlmodelgen.py │ └── utils │ └── dependency_checker.py ├── tests ├── files │ └── hero.db ├── helpers │ ├── helpers.py │ ├── mysql_container.py │ └── postgres_container.py ├── test_build_cir.py ├── test_build_rels.py ├── test_convert_data_type.py ├── test_gen_from_mysql.py ├── test_gen_from_postgres.py ├── test_gen_from_sql.py ├── test_gen_from_sqlite.py ├── test_helpers.py ├── test_ir_parse.py └── test_org_parse.py └── uv.lock /.coveragerc: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | relative_files = true 3 | omit = 4 | tests/* -------------------------------------------------------------------------------- /.github/workflows/.cov.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/.github/workflows/.cov.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/.gitignore -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.11 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/README.md -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/pyproject.toml -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | pythonpath = src -------------------------------------------------------------------------------- /src/sqlmodelgen/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/__init__.py -------------------------------------------------------------------------------- /src/sqlmodelgen/codegen/cir_to_full_ast/code_ir_to_ast.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/codegen/cir_to_full_ast/code_ir_to_ast.py -------------------------------------------------------------------------------- /src/sqlmodelgen/codegen/cir_to_full_ast/to_ast_imports.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/codegen/cir_to_full_ast/to_ast_imports.py -------------------------------------------------------------------------------- /src/sqlmodelgen/codegen/code_ir/build_cir.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/codegen/code_ir/build_cir.py -------------------------------------------------------------------------------- /src/sqlmodelgen/codegen/code_ir/build_col_attrs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/codegen/code_ir/build_col_attrs.py -------------------------------------------------------------------------------- /src/sqlmodelgen/codegen/code_ir/build_common.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/codegen/code_ir/build_common.py -------------------------------------------------------------------------------- /src/sqlmodelgen/codegen/code_ir/build_rels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/codegen/code_ir/build_rels.py -------------------------------------------------------------------------------- /src/sqlmodelgen/codegen/code_ir/build_table_args.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/codegen/code_ir/build_table_args.py -------------------------------------------------------------------------------- /src/sqlmodelgen/codegen/code_ir/code_ir.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/codegen/code_ir/code_ir.py -------------------------------------------------------------------------------- /src/sqlmodelgen/codegen/codegen.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/codegen/codegen.py -------------------------------------------------------------------------------- /src/sqlmodelgen/codegen/convert_data_type.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/codegen/convert_data_type.py -------------------------------------------------------------------------------- /src/sqlmodelgen/ir/ir.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/ir/ir.py -------------------------------------------------------------------------------- /src/sqlmodelgen/ir/mysql/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/ir/mysql/__init__.py -------------------------------------------------------------------------------- /src/sqlmodelgen/ir/parse/ir_parse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/ir/parse/ir_parse.py -------------------------------------------------------------------------------- /src/sqlmodelgen/ir/parse/org_parse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/ir/parse/org_parse.py -------------------------------------------------------------------------------- /src/sqlmodelgen/ir/postgres/postgres_collect.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/ir/postgres/postgres_collect.py -------------------------------------------------------------------------------- /src/sqlmodelgen/ir/query/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/ir/query/__init__.py -------------------------------------------------------------------------------- /src/sqlmodelgen/ir/sqlite/sqlite_parse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/ir/sqlite/sqlite_parse.py -------------------------------------------------------------------------------- /src/sqlmodelgen/sqlmodelgen.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/sqlmodelgen.py -------------------------------------------------------------------------------- /src/sqlmodelgen/utils/dependency_checker.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/src/sqlmodelgen/utils/dependency_checker.py -------------------------------------------------------------------------------- /tests/files/hero.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/files/hero.db -------------------------------------------------------------------------------- /tests/helpers/helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/helpers/helpers.py -------------------------------------------------------------------------------- /tests/helpers/mysql_container.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/helpers/mysql_container.py -------------------------------------------------------------------------------- /tests/helpers/postgres_container.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/helpers/postgres_container.py -------------------------------------------------------------------------------- /tests/test_build_cir.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/test_build_cir.py -------------------------------------------------------------------------------- /tests/test_build_rels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/test_build_rels.py -------------------------------------------------------------------------------- /tests/test_convert_data_type.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/test_convert_data_type.py -------------------------------------------------------------------------------- /tests/test_gen_from_mysql.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/test_gen_from_mysql.py -------------------------------------------------------------------------------- /tests/test_gen_from_postgres.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/test_gen_from_postgres.py -------------------------------------------------------------------------------- /tests/test_gen_from_sql.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/test_gen_from_sql.py -------------------------------------------------------------------------------- /tests/test_gen_from_sqlite.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/test_gen_from_sqlite.py -------------------------------------------------------------------------------- /tests/test_helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/test_helpers.py -------------------------------------------------------------------------------- /tests/test_ir_parse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/test_ir_parse.py -------------------------------------------------------------------------------- /tests/test_org_parse.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/tests/test_org_parse.py -------------------------------------------------------------------------------- /uv.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nucccc/sqlmodelgen/HEAD/uv.lock --------------------------------------------------------------------------------