sqldb

package
v0.0.0-...-80d4866 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package sql represents SQL database implementation of the user data persistence layer

Index

Constants

View Source
const (
	QUERY_PAYMENT_BY_ID string = "SELECT id, source_account, target_account, amount, payment_method, status, " +
		"order_number, created_time, completion_time FROM payment where id =?"
	QUERY_PAYMENT_BY_ORDER_NUMBER = "SELECT * FROM payment where order_number =?"
	QUERY_PAYMENT                 = "SELECT * FROM payment "
	INSERT_PAYMENT                = "INSERT payment SET source_account=?,target_account=?, amount=?, payment_method=?," +
		"status=?, order_number =?,created_time=?, completion_time=?"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PaymentDataSql

type PaymentDataSql struct {
	DB gdbc.SqlGdbc
}

PaymentDataSql is the SQL implementation of PaymentDataInterface

func (*PaymentDataSql) Find

func (uds *PaymentDataSql) Find(id int) (*model.Payment, error)

func (*PaymentDataSql) FindAll

func (uds *PaymentDataSql) FindAll() ([]model.Payment, error)

func (*PaymentDataSql) FindByOrderNumber

func (uds *PaymentDataSql) FindByOrderNumber(orderNumber string) (*model.Payment, error)

func (*PaymentDataSql) Insert

func (uds *PaymentDataSql) Insert(p *model.Payment) (*model.Payment, error)

Jump to

Keyboard shortcuts

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