Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/sqlalchemy_cratedb/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,17 @@
)
return

def visit_create_index(self, create, **kw) -> str:
"""
CrateDB does not support `CREATE INDEX` statements.
"""
warnings.warn(

Check warning on line 207 in src/sqlalchemy_cratedb/compiler.py

View check run for this annotation

Codecov / codecov/patch

src/sqlalchemy_cratedb/compiler.py#L207

Added line #L207 was not covered by tests
"CrateDB does not support `CREATE INDEX` statements, "
"they will be omitted when generating DDL statements.",
stacklevel=2,
)
return "SELECT 1"

Check warning on line 212 in src/sqlalchemy_cratedb/compiler.py

View check run for this annotation

Codecov / codecov/patch

src/sqlalchemy_cratedb/compiler.py#L212

Added line #L212 was not covered by tests


class CrateTypeCompiler(compiler.GenericTypeCompiler):
def visit_string(self, type_, **kw):
Expand Down