https://github.com/samuelmarks/odbc-cli-c
ODBC CLI. Intended for simple use-cases: execution from file or literals; with proper sanitisation.
https://github.com/samuelmarks/odbc-cli-c
Last synced: about 2 months ago
JSON representation
ODBC CLI. Intended for simple use-cases: execution from file or literals; with proper sanitisation.
- Host: GitHub
- URL: https://github.com/samuelmarks/odbc-cli-c
- Owner: SamuelMarks
- License: apache-2.0
- Created: 2024-08-19T18:46:34.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-19T22:34:49.000Z (almost 2 years ago)
- Last Synced: 2025-01-28T04:32:00.232Z (over 1 year ago)
- Language: C
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
odbc-cli-c
============
[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/SamuelMarks/odbc-cli-c/actions)
[](https://cirrus-ci.com/github/SamuelMarks/odbc-cli-c)
[](https://en.wikipedia.org/wiki/C89_(C_version))
ODBC CLI. Intended for simple use-cases: execution from file or literals; with proper sanitisation.
## `--help`
odbc-cli-c: ODBC CLI
Usage:
odbc-cli-c...
odbc-cli-c --output=...
odbc-cli-c --command=...
odbc-cli-c --command-file=...
odbc-cli-c -c= --params=...
odbc-cli-c --help
odbc-cli-c --version
Options:
-h --help Show this screen.
--version Show version.
-c=, --command= Query to execute
-f=, --command-file= Alternative query to execute from file or stdin
-p=
, --params=
Parameters to provide sanitarily to SQL query
-o=, --output= Output file. If not specified: will use `stdout`. If specified: will overwrite file.
## Build dependencies
- [CMake](https://cmake.org) (3.19 or later)
- C compiler (any that work with CMake, and were released within the last 30 years)
### Build
```bash
mkdir build && cd build
cmake ..
cmake --build .
```
### Docker
```bash
docker build . -t odbc-cli-c:latest
```
### CLI interface
Generated with `docopt`, use `python -m pip install https://api.github.com/repos/offscale/docopt.c/zipball/pyth
on-3-13#egg=docopt_c` then:
```bash
$ python -m docopt_c '.docopt' -o 'odbc_cli_c/odbc_cli_c'
```
---
## License
Licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or )
- MIT license ([LICENSE-MIT](LICENSE-MIT) or )
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.