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

conform to Records' API #55

Open
chadwhitacre opened this issue Feb 13, 2016 · 2 comments
Open

conform to Records' API #55

chadwhitacre opened this issue Feb 13, 2016 · 2 comments

Comments

@chadwhitacre
Copy link
Collaborator

@kennethreitz has launched Records, "SQL for Humans™". Given the relative star count (~1,500 in 6 days vs. 36 in 3 years), it seems that the Python world now has a de facto DB-API 3.0—and it's not ours. :o)

Records is database-agnostic (cf. kennethreitz/records#41). So far it seems to me that there's value in continuing with Postgres.py because of the ORM layer. The proposal here is to change our top-level run/one/all API to conform to what @kennethreitz has come up with:

row_iterator = db.query('select * from foo')
row_list = row_iterator.all()

So we'd essentially rename run to query, and chain all (and one, which Records doesn't have—yet?) onto the result.

@Changaco
Copy link
Member

I think both projects should add compatibility with the other, the shortcut methods of postgres.py and the chaining of Records are both useful.

@chadwhitacre
Copy link
Collaborator Author

(and one, which Records doesn't have—yet?)

kennethreitz/records#43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants