Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: inspect.get_pk_constraint() not supported #594

Open
1 task done
SoumayaMauthoorMOJ opened this issue Apr 1, 2023 · 0 comments
Open
1 task done

[Bug]: inspect.get_pk_constraint() not supported #594

SoumayaMauthoorMOJ opened this issue Apr 1, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@SoumayaMauthoorMOJ
Copy link

What happened?

inspect.get_pk_constraint( not supported

import sqlalchemy
engine = sqlalchemy.create_engine('duckdb:///:memory:')
metadata = sqlalchemy.MetaData(engine)
user_id_seq = sqlalchemy.Sequence('user_id_seq')
users_table = sqlalchemy.Table(
     'users',
     metadata,
     sqlalchemy.Column(
         'id',
         sqlalchemy.Integer,
         user_id_seq,
         server_default=user_id_seq.next_value(),
         primary_key=True,
     ),
 )
metadata.create_all(bind=engine)
insp = sqlalchemy.inspect(engine)
insp.get_pk_constraint('users', 'main')

returns:

{'constrained_columns': [], 'name': 'PRIMARY KEY(id)'}

when I expect it to return:

'constrained_columns': ['id']

DuckDB Engine Version

0.7.0

DuckDB Version

0.7.1

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants