package
0.0.0-20240812134449-a5224bcfa94d
Repository: https://github.com/adantop/golang-bootcamp-2020.git
Documentation: pkg.go.dev

# README

Database Support

Using SQLite3

Database can be generated following the next commands:

cd {project_root}
sqlite3 {db_name} < ./resources/pokemon.sql

Using PostgreSQL

The source file is located at {project_root}/resources/pokemon.sql there is a docker compose file which can be used to start a database instance:

cd {project_root}/resources
docker-compose up -d

Interesting packages:

# Functions

UsePostgreSQL overwrites the db module DB var with a pg implementation.
UseSQLite3 overwrites the db module DB var with an SQLite3 implementation.

# Variables

DS Is the pokemon Datasource.

# Structs

PostgreSQL is a datasource type for pg connection.
SQLite3 is a datasource type for sqlite3 connection.