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

Getting DB/table information #45

Open
selwin opened this issue Nov 25, 2014 · 5 comments
Open

Getting DB/table information #45

selwin opened this issue Nov 25, 2014 · 5 comments

Comments

@selwin
Copy link

selwin commented Nov 25, 2014

Hi there, first of all thanks for writing this awesome project.

What are you thoughts on adding a way to get db/table size to this library? I was thinking something along the lines of:

db = DB(profile='default')
db.size  # Returns db size
db.tables.my_table.size  # Returns table size
db.tables.my_table.rows  # Returns number of rows

The ability to run EXPLAIN statements would also be really useful.

@maurobaraldi
Copy link

What do you mean by table/db size?

@selwin
Copy link
Author

selwin commented Mar 7, 2015

For example, postgresql has "pg_database_size(name)" that returns the disk size used by the DB.

@maurobaraldi
Copy link

It's a sysadmin's related feature, I think it's getting out of project focus. Rows count is a good feature.

@maurobaraldi
Copy link

This issue can be closed. The pull request 64 already merged, meet the needs of this request.

@selwin
Copy link
Author

selwin commented Mar 13, 2015

Well, it depends on how you look at it I suppose. I would think this project's focus is to make it easier to talk to databases and that includes getting information about them or the tables inside.

Just my two cents though ;)

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

No branches or pull requests

2 participants