https://github.com/yuce/go-client-sql-sample
Sample project to demonstrate Go SQL Driver for Hazelcast
https://github.com/yuce/go-client-sql-sample
Last synced: 11 months ago
JSON representation
Sample project to demonstrate Go SQL Driver for Hazelcast
- Host: GitHub
- URL: https://github.com/yuce/go-client-sql-sample
- Owner: yuce
- Created: 2021-11-25T15:24:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-22T12:34:22.000Z (over 4 years ago)
- Last Synced: 2025-02-22T18:31:17.651Z (over 1 year ago)
- Language: Go
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go SQL Driver for Hazelcast Sample
This project demonstrates how to use the Hazelcast [database/sql](https://pkg.go.dev/database/sql) driver.
## Build
1. Run `go mod tidy` to download the latest Hazelcast Go client with SQL support
2. Run `make sqlrun` which builds the `sqlrun` binary.
## Usage
Make sure you use [Hazelcast Platform 5.0](https://hazelcast.com/get-started/) and Jet is enabled in your Hazelcast configuration (it is by default):
### sqlrun
`sqlrun` can execute SQL commands from a file. You can optionally specify connection arguments:
$ sqlrun -f myfile.sql
$ sqlrun -c "10.20.30.40:5701;ClusterName=prod" -f myfile.sql
It is also possible to execute an SQL string:
$ sqlrun -e "select * from employees"