coozy

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 6 Imported by: 0

README

coozy

A collection of utilities that may help with pop.

Documentation

Index

Constants

View Source
const Version = "0.1.0"

Version contains the package version.

Variables

This section is empty.

Functions

func AppendQueryNullableStringCriteria

func AppendQueryNullableStringCriteria(queryBuilder *strings.Builder, queryParameters *[]interface{}, fieldName string, fieldValue nulls.String) (added bool)

AppendQueryNullableStringCriteria adds an AND clause to the query being constructed in with the provided Builder and parameter values slice.

func AppendQueryStringCriteria

func AppendQueryStringCriteria(queryBuilder *strings.Builder, queryParameters *[]interface{}, fieldName string, fieldValue string) (added bool)

AppendQueryStringCriteria adds an AND clause to the query being constructed in with the provided Builder and parameter values slice.

func AppendQueryUUIDCriteria

func AppendQueryUUIDCriteria(queryBuilder *strings.Builder, queryParameters *[]interface{}, fieldName string, fieldValue uuid.UUID) (added bool)

AppendQueryUUIDCriteria adds an AND clause to the query being constructed in with the provided Builder and parameter values slice.

func FindConnectedPop added in v0.0.4

func FindConnectedPop(tx *pop.Connection, criteria WhereLiker, recs interface{}, eagerFetchFields ...string) (err error)

FindConnectedPop queries the named environment for records based on the supplied criteria.

func FindPop

func FindPop(popEnvironmentName string, criteria WhereLiker, recs interface{}, eagerFetchFields ...string) (err error)

FindPop queries the named environment for records based on the supplied criteria.

func NullableJSONMap added in v0.0.2

func NullableJSONMap(ns nulls.String) (m map[string]string)

NullableJSONMap returns map poplated from not-null JSON string when provided.

func SaveConnectedPop added in v0.0.4

func SaveConnectedPop(tx *pop.Connection, rec interface{}) (err error)

SaveConnectedPop saves a record struct into the provided Pop connection.

func SavePop

func SavePop(popEnvironmentName string, rec interface{}) (err error)

SavePop saves a record struct into the named environment.

func StringsValidEqual added in v0.0.3

func StringsValidEqual(a *nulls.String, b *nulls.String) bool

StringsValidEqual returns true if both a and b are valid and contain equal values.

func TimesValidEqual added in v0.0.3

func TimesValidEqual(a *nulls.Time, b *nulls.Time) bool

TimesValidEqual returns true if both a and b are valid and contain equal values.

func TimesVary added in v0.0.3

func TimesVary(a *nulls.Time, b *nulls.Time) (result bool)

TimesVary returns true if either a or b are valid and contain unequal values.

func TimesVaryMoreThan added in v0.0.3

func TimesVaryMoreThan(a *nulls.Time, b *nulls.Time, skew time.Duration) (result bool)

TimesVaryMoreThan returns true if either a or b are valid and contain values that differ greater than the specified skew.

func UUIDValidEqual added in v0.0.3

func UUIDValidEqual(a uuid.UUID, b uuid.UUID) bool

UUIDValidEqual returns true if both a and b are non-zero and have equal values.

Types

type WhereLiker

type WhereLiker interface {
	WhereLike(q *pop.Query) *pop.Query
}

WhereLiker defines the WhereLike() method used by FindPop.

Jump to

Keyboard shortcuts

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