From 1bd2832e3e22c9edb15f3da5417677c263726787 Mon Sep 17 00:00:00 2001 From: Piotr Synowiec Date: Sun, 19 May 2024 16:30:35 +0200 Subject: [PATCH] : init --- .gitignore | 23 +++++++++++++++++++++++ README.md | 20 ++++++++++++++++++++ go.mod | 3 +++ 3 files changed, 46 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 go.mod diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..78f591a --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +### Go template +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work + diff --git a/README.md b/README.md new file mode 100644 index 0000000..0369023 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# go-sql-raw + +The main reason that this module has been created was generic querying database without knowing table structure. + +## How to use it + +```go +rows, err: = Db.Query("SELECT * FROM album") + +defer rows.Close() +var data []RawStringType +for rows.Next() { + rec := Rows2Map(rows) + data = append(data, rec) +} + +``` + +## TODO +* ... \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..8930454 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/mysiar-org/go-sql-raw + +go 1.22.2