We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I wish their was a built-in way to insert dictionaries.
This is what I wish existed
from pypika import Query, Table users = Table('users') Query.into(users).insert_dict({ 'first_name': 'John', 'last_name': 'Doe', })
This is what I'm currently doing:
@classmethod def insert_dict(self, table, d): return ( self .into(table) .columns(*d.keys()) .insert(*d.values()) ) Query.insert_dict = insert_dict Query.insert_dict(users, { 'first_name': 'John', 'last_name': 'Doe', })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I wish their was a built-in way to insert dictionaries.
This is what I wish existed
This is what I'm currently doing:
The text was updated successfully, but these errors were encountered: