Adding properly

The .git folder messed up the initial commit.
This commit is contained in:
Matt Jadud
2025-11-30 17:18:41 -05:00
parent 80b55d1a3b
commit 23923b7be4
15 changed files with 1511 additions and 0 deletions

29
internal/liteq/Makefile Normal file
View File

@@ -0,0 +1,29 @@
default:
go run *.go || (go get ./... && go run *.go)
watch:
(watchexec -e sql -- make schema-const) & \
(watchexec -e sql -- sqlc generate) & \
(watchexec -w sqlc.yaml -- sqlc generate) & \
(watchexec -e go -c -r -- go test ./... -count 1) & \
wait
# SQL Watcher done
# Puts the schema in a constant in go so it can be used to create the table directly
schema-const:
echo "// Code generated by Makefile. DO NOT EDIT." > internal/schema.go
echo "package internal\n" >> internal/schema.go
echo "const Schema = \`" >> internal/schema.go
cat db/schema.sql >> internal/schema.go
echo "\`" >> internal/schema.go
.PHONY: bench
bench:
make cleanup
make schema-const
sqlc generate
cd bench && go run main.go
cleanup:
rm -f bench/bench.db*