[GRASS-git] [OSGeo/grass] 2a7fe2: db.select: Adding JSON and CSV support (#6728)
Gulshan Kumar
noreply at github.com
Fri Dec 26 10:42:41 PST 2025
Branch: refs/heads/main
Home: https://github.com/OSGeo/grass
Commit: 2a7fe23c50574a096f599cd43436ae45178bf96d
https://github.com/OSGeo/grass/commit/2a7fe23c50574a096f599cd43436ae45178bf96d
Author: Gulshan Kumar <72340125+gulshan-123 at users.noreply.github.com>
Date: 2025-12-26 (Fri, 26 Dec 2025)
Changed paths:
M db/CMakeLists.txt
M db/db.select/Makefile
M db/db.select/main.c
A db/db.select/testsuite/test_db_select_json_csv.py
Log Message:
-----------
db.select: Adding JSON and CSV support (#6728)
* WIP added json+plain
* added plain + json format as of now
* added error handling
* json output to file + removed redundant set_string call
* added support for exclusion
* added support for vertical, and csv too
By default, for backward copatibilty format=plain with separator as |
* added json format for -d
* added tests
* solved issue where delimiter is also in the text
* nitpicks
* [deprecated] placements
* json excludes -c flag
* json will be array, and can be read for multiple sql
* refactored code so that on -d empty records array are not displayed
* refactored code + error handling
* added test for multiple queries
* test in separate class
* array returned only in case of input, where possibly many sql statement can be present
* updated test
* fixed possible memory leak
To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications
More information about the grass-commit
mailing list