db

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package db is used for database access.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	*dynamodb.DynamoDB
}

Connection to DynamoDB.

func New

func New(session client.ConfigProvider) *Connection

New DynamoDB connection.

func (*Connection) Execute

func (c *Connection) Execute(stmt string, params []interface{}, results interface{}) error

Execute a PartiQL query.

func (*Connection) Get

func (c *Connection) Get(table string, keys map[string]interface{}, result interface{}) error

Get an item from a table.

func (*Connection) Put

func (c *Connection) Put(table string, i interface{}) error

Put an item into a table.

func (*Connection) Size

func (c *Connection) Size(table string) (int, error)

Size of the given table.

Jump to

Keyboard shortcuts

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