signature

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 2 Imported by: 0

README

GitHub go.mod Go version (subdirectory of monorepo) Go Reference

Go Postgres Signature Library

This library provides to run procedure and function for postgresql

Installation

go get -u github.com/elvin-tacirzade/go-pg-signature

Usage

We call New function. This function takes *sqlx.DB parameter and return Signature struct.

Signature includes two functions:

  1. RunProcedure()
  2. RunFunction()

See the example subdirectory for more information.

Documentation

Overview

Package signature provides to run procedure and function for postgresql

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signature

type Signature struct {
	DB *sqlx.DB
}

Signature contains sqlx database and has RunProcedure and RunFunction functions

func New

func New(db *sqlx.DB) *Signature

New creates a new Signature

func (*Signature) RunFunction

func (s *Signature) RunFunction(schemaName, functionName string, params map[string]interface{}) (*sqlx.Rows, error)

RunFunction runs function that return *sqlx.Row and error

func (*Signature) RunProcedure

func (s *Signature) RunProcedure(schemaName, procedureName string, params map[string]interface{}) (*sqlx.Rows, error)

RunProcedure runs procedure that return *sqlx.Row and error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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