package
module
Version:
v1.4.9
Opens a new window with list of versions in this module.
Published: Jul 17, 2025
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
gFly Database - PostgreSQL
Copyright © 2023, gFly
https://www.gfly.dev
All rights reserved.
Fluent Model - flexible and powerful Data-Access Layer. Build on top of Fluent SQL
Usage
Install
go get -u github.com/gflydev/db@v1.0.0
go get -u github.com/gflydev/db/psql@v1.1.0
Quick usage main.go
import (
mb "github.com/gflydev/db"
dbPSQL "github.com/gflydev/db/psql"
)
func main() {
// Register DB driver & Load Model builder
mb.Register(dbPSQL.New())
mb.Load()
}
Documentation
¶
PostgreSQL implements the IDatabase interface for PostgreSQL database operations.
New initializes a new PostgreSQL driver and registers it to the database manager.
Returns:
- *PostgreSQL: A new instance of the PostgreSQL driver.
Load establishes a connection to the PostgreSQL database.
Returns:
- *sqlx.DB: The database connection instance.
- error: An error if the connection fails.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.