core

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: LGPL-2.1 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbApi

type DbApi struct {
	Db        *sql.DB
	TableName string
}

this is a basic api structure that has some core methods and its supposed to be used only with other structures as theirs parent structure

func (*DbApi) ChangeDb added in v0.0.5

func (dapi *DbApi) ChangeDb(newDb *sql.DB)

you can change db value with this function

func (*DbApi) ChangeTableName added in v0.1.0

func (dapi *DbApi) ChangeTableName(name string)

func (*DbApi) CheckDb added in v0.1.1

func (dapi *DbApi) CheckDb() error

use for checking db connection

func (*DbApi) CloseDb added in v0.0.5

func (dapi *DbApi) CloseDb()

you can close db by this method

func (*DbApi) GetDb added in v0.0.5

func (dapi *DbApi) GetDb() *sql.DB

if you need to get database instance you will use this method

Jump to

Keyboard shortcuts

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