psql

package module
v1.4.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 6 Imported by: 0

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgreSQL

type PostgreSQL struct{}

PostgreSQL implements the IDatabase interface for PostgreSQL database operations.

func New

func New() *PostgreSQL

New initializes a new PostgreSQL driver and registers it to the database manager.

Returns: - *PostgreSQL: A new instance of the PostgreSQL driver.

func (*PostgreSQL) Load

func (d *PostgreSQL) Load() (*sqlx.DB, error)

Load establishes a connection to the PostgreSQL database.

Returns: - *sqlx.DB: The database connection instance. - error: An error if the connection fails.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL