db

package
v0.0.0-...-7e7e9a6 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Responsible for interacting with the SQLite3 'data.db'.

Does not follow ORM style. Contains just optimized methods for fast interaction with database.

Index

Constants

This section is empty.

Variables

View Source
var Instance *sql.DB

One instance to rule them all

Functions

func Decrypt

func Decrypt(data string) j

Decrypts db related data

func DeleteApp

func DeleteApp(appID string)

Permanently deletes app from database

func Encrypt

func Encrypt(data j) string

Encrypts db related data

func Exec

func Exec(q string, args ...interface{})

Default exec method. Handles errors automatically

func GetAppByID

func GetAppByID(id string) j

Retrieves row data by its ID formatted

func GetApps

func GetApps() []j

Retrieves all records from 'apps' table formatted

func Init

func Init()

Initializes the database system

func MakeApp

func MakeApp(data j) string

Creates a new application with afferent data and inserts it in DB. Returns newly created app's ID

func Query

func Query(q string, args ...interface{}) *sql.Rows

Default query method. Returns only the rows. Handles errors automatically

func UpdateApp

func UpdateApp(appID string, data j)

Updates an app based on ID. Overwrites existing data

Types

This section is empty.

Jump to

Keyboard shortcuts

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