-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
v.db.select: Add column names and types to JSON #3090
v.db.select: Add column names and types to JSON #3090
Conversation
The JSON output now has column names and types under info/columns. The example in documentation does not include the unclear note about booleans (perhaps a discussion for another place). A command to reproduce the example output is now included. Documentation and test of the new functionality are included.
List of column names in Python are obtained by: column_names = [item["name"] for item in data["info"]["columns"]] Is this good? Convenient enough? |
…s checks. Now depends on v.db.select producing the list of column names OSGeo#3090. Test and example included.
Do you plan on including any other information in |
Not now, but in the future, yes. I was thinking about including output of the bounding box flag (-r Print minimal region extent of selected vector features instead of attributes). That would go on the top level next to info and records. Record count would make sense. I would avoid repeating random inputs unless we want to start including provenance. I guess this suggests that info should be skipped. I was also thinking about including |
If the plan is to include more to |
Okay, thanks. I guess it's not strong either way, but I'll keep it as is. The format is flexible enough and we can change it later too with some temporary duplication cost. |
This has tests, documentation, and the design seems reasonable. I'm merging it. |
…s checks. Now depends on v.db.select producing the list of column names OSGeo#3090. Test and example included.
The JSON output now has column names and types under info/columns. The example in documentation does not include the unclear note about booleans (a discussion for another place). A command to reproduce the example output is now included. Documentation and test of the new functionality are included.
The JSON output now has column names and types under info/columns. The example in documentation does not include the unclear note about booleans (a discussion for another place). A command to reproduce the example output is now included. Documentation and test of the new functionality are included.
The JSON output now has column names and types under info/columns.
The example in documentation does not include the unclear note about booleans (perhaps a discussion for another place).
A command to reproduce the example output is now included.
Documentation and test of the new functionality are included.