Skip to content
New issue

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

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

Already on GitHub? # to your account

Add documentation on Database introspection methods to internals.rst #684

Closed
simonw opened this issue Feb 25, 2020 · 4 comments
Closed

Add documentation on Database introspection methods to internals.rst #684

simonw opened this issue Feb 25, 2020 · 4 comments

Comments

@simonw
Copy link
Owner

simonw commented Feb 25, 2020

internals.rst will be landing as part of #683

@simonw
Copy link
Owner Author

simonw commented Feb 25, 2020

Here's what I have so far:

db.name

db.size

db.mtime_ns

await db.table_exists(table)

await db.table_names()

await db.table_columns(table)

await db.primary_keys(table)

Returns the names of the columns that are part of the primary key for this table.

await db.fts_table(table)

Returns the name of the FTS table associated with this table, if one exists.

await db.label_column_for_table(table)

Returns the label column that is associated with this table - either automatically detected or using the ``"label_column"`` key from :ref:`metadata`.

await db.foreign_keys_for_table(table)

await db.hidden_table_names()

await db.view_names()

await db.get_all_foreign_keys()

await db.get_outbound_foreign_keys(table)

await db.get_table_definition(table)

await db.get_view_definition(view)

@simonw
Copy link
Owner Author

simonw commented Feb 25, 2020

@simonw
Copy link
Owner Author

simonw commented Feb 25, 2020

More important is to document execute() - see #685

@simonw simonw added this to the Datasette 1.0 milestone May 30, 2020
@simonw simonw closed this as completed in c4fbe50 May 30, 2020
@simonw
Copy link
Owner Author

simonw commented Jun 4, 2020

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant