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

Expand documentation #57

Open
tomchristie opened this issue Feb 28, 2019 · 6 comments
Open

Expand documentation #57

tomchristie opened this issue Feb 28, 2019 · 6 comments
Labels
documentation Project documentation

Comments

@tomchristie
Copy link
Member

tomchristie commented Feb 28, 2019

In particular:

  • More examples of queries.
  • Examples of using JSON field.
  • Examples with joining tables.
  • Getting PK of inserted rows.
  • Properly document return types of the databases API.
@tomchristie
Copy link
Member Author

See also #31

gvbgduh added a commit to gvbgduh/databases that referenced this issue Mar 6, 2019
@mivade
Copy link
Contributor

mivade commented Sep 6, 2019

Getting PK of inserted rows.

Is this currently possible?

@mivade
Copy link
Contributor

mivade commented Sep 6, 2019

Digging into the code, it looks like it is in the same way as with SQLAlchemy (i.e., it gets returned when calling execute on an insert statement). Unfortunately this doesn't always return the primary key though. For example, with SQLite, the last "rowid" gets returned which corresponds to an integer primary key (in cases where the primary key is an integer) or the "undeclared" ROWID column: https://docs.python.org/3/library/sqlite3.html#sqlite3.Cursor.lastrowid

@brainless
Copy link

Hey everyone, I am using databases for two of my products and would like to work on the documentation issue. I see this is still open. Since this GitHub issue is very old I would like to know if the issue points are still valid. I will go through the documentation again today just to double check. Any pointers would be helpful as I am a bit hesitant to contribute to such an important project. Thanks

@hp0404
Copy link

hp0404 commented Jul 11, 2021

@brainless would be great tbh, currently stuck with joining tables :)

@Pk13055
Copy link

Pk13055 commented Dec 30, 2022

Is there any update on this? This is a pretty good async library, but lack of documentation (+ generic name) makes it difficult to find/google anything complex..

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

No branches or pull requests

5 participants