domino

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: MIT Imports: 12 Imported by: 0

README

Domino

Build GoDoc

Features

  • Fully typesafe fluent syntax DSL
  • Full Condition and Filter Expression functionality
  • Static schema definition
  • Streaming results for Query, Scan and BatchGet operations

Examples

Creating a Table
import(
  "github.com/aws/aws-sdk-go/service/dynamodb"
  "github.com/aws/aws-sdk-go/aws/session"
)

sess := session.New(config)
dynamo := dynamodb.New(sess)

//Define your table schema statically
type UserTable struct {
  DynamoTable
  emailField    domino.String
  passwordField domino.String

  registrationDate domino.Numeric
  loginCount       domino.Numeric
  lastLoginDate    domino.Numeric
  vists            domino.NumericSet
  preferences      domino.MapField
  nameField        domino.String
  lastNameField    domino.String
  locales          domino.List
  degrees          domino.NumericSet

  registrationDateIndex domino.LocalSecondaryIndex
  nameGlobalIndex       domino.GlobalSecondaryIndex
}

// Define domain object
type User struct {
  Email       string            `dynamodbav:"email"`
  Password    string            `dynamodbav:"password"`
  Visits      []int64           `dynamodbav:"visits,numberset,omitempty"`
  Degrees     []float64         `dynamodbav:"degrees,numberset,omitempty"`
  Locales     []string          `dynamodbav:"locales,omitempty"`
  LoginCount  int               `dynamodbav:"loginCount"`
  RegDate     int64             `dynamodbav:"registrationDate"`
  Preferences map[string]string `dynamodbav:"preferences,omitempty"`
}

//Initialize the table
func NewUserTable() MyTable {
  pk := domino.StringField("email")
  rk := domino.StringField("password")
  firstName := domino.StringField("firstName")
  lastName := domino.StringField("lastName")
  reg := domino.NumericField("registrationDate")
  return MyTable{
    DynamoTable{
      Name:         "mytable",
      PartitionKey: pk,
      RangeKey:     rk,
    },
    pk,  //email
    rk,  //password
    reg, //registration
    domino.NumericField("loginCount"),
    domino.NumericField("lastLoginDate"),
    domino.NumericSetField("visits"),
    domino.MapField("preferences"),
    firstName,
    lastName,
    StringSetField("locales"),
    NumericSetField("degrees"),
    domino.LocalSecondaryIndex{"registrationDate-index", reg},
    domino.GlobalSecondaryIndex{"name-index", firstName, lastName},
  }
}

table := NewUserTable()

Use a fluent style DSL to interact with your table. All DynamoDB data operations are supported

Put Item
q := table.
  PutItem(
    User{"naveen@email.com","password"},
  ).
  SetConditionExpression(
    table.PartitionKey.NotExists()
  )

result := dynamo.PutItem(q).ReturnAllOld().ExecuteWith(dynamo)
user := &User{}
err := result.Result(user) //Inflate the user object representing the old value.
Get Item
q := table.
  GetItem(
    KeyValue{"naveen@email.com", "password"},
  ).
  SetConsistentRead(true)

user := &User{}
err = dynamo.GetItem(q, &User{}).ExecuteWith(dynamo).Result(user) //Pass in domain object template object
Update Item
q := table.
  UpdateItem(
    KeyValue{"naveen@email.com", "password"}
  ).
  SetUpdateExpression(
    table.loginCount.Increment(1),
    table.lastLoginDate.SetField(time.Now().UnixNano(), false),
    table.registrationDate.SetField(time.Now().UnixNano(), true),
    table.vists.RemoveElemIndex(0),
    table.preferences.RemoveKey("update_email"),
  )
err = dynamo.UpdateItem(q).ExecuteWith(dynamo).Error()
Batch Get Item
q := table.
  BatchGetItem(
    KeyValue{"naveen@email.com", "password"},
    KeyValue{"joe@email.com", "password"},
  ).
  SetConsistentRead(true)

  users := []*User{} //Set of return items
  q.ExecuteWith(db).Results(func() interface{} {
    user := User{}
    users = append(users, &user)
    return &user
  })
Fully typesafe condition expression and filter expression support.
expr := Or(
    table.lastNameField.Contains("gattu"),
    Not(table.registrationDate.Contains(12345)),
    And(
      table.visits.Size(lte, 25),
      table.nameField.Size(gte, 25),
    ),
    table.lastLoginDate.LessThanOrEq(time.Now().UnixNano()),
  )
q = table.
  Query(
    table.nameField.Equals("naveen"),
    table.lastNameField.Equals("gattu"),
  ).
  SetFilterExpression(expr)
Atomic Set and List operations
table.
  UpdateItem(
    KeyValue{"naveen@email.com", "password"}
  ).
  SetUpdateExpression(
    table.visits.AddInteger(time.Now().UnixNano()),
    table.locales.Append("us"),
  )
Streaming Results - Allows for lazy data fetching and consuming
p := table.passwordField.BeginsWith("password")
q := table.
Query(
    table.emailField.Equals("naveen@email.com"),
    &p,
  ).
  SetLimit(100).
  SetScanForward(true)

channel := make(chan *User)
errChan := q.ExecuteWith(ctx, db).StreamWithChannel(channel)
users := []*User{}

for {
  select {
  case u, ok := <-channel:
    if ok {
      users = append(users, u)
    }
  case err = <-errChan:

  }
}
p := table.passwordField.BeginsWith("password")
q := table.Scan().SetLimit(100).

channel := make(chan *User)
errChan := q.ExecuteWith(db).StreamWithChannel(channel)

for {
  select {
  case u, ok := <-channel:
    if ok {
      fmt.Println(u)
    }
  case err = <-errChan:
  }
}

Documentation

Index

Constants

View Source
const (
	ProjectionTypeALL       = "ALL"
	ProjectionTypeINCLUDE   = "INCLUDE"
	ProjectionTypeKEYS_ONLY = "KEYS_ONLY"
)

Variables

This section is empty.

Functions

func Not

func Not(c Expression) negation

Not represents the dynamo NOT operator

Types

type Binary

type Binary struct {
	// contains filtered or unexported fields
}

Binary - A binary dynamo field

func BinaryField

func BinaryField(name string) Binary

BinaryField ... A constructor for a binary dynamo field

type BinarySet

type BinarySet struct {
	// contains filtered or unexported fields
}

BinarySet - A binary dynamo field

func BinarySetField

func BinarySetField(name string) BinarySet

BinarySetField ... A constructor for a binary set dynamo field

func (*BinarySet) Add added in v1.0.2

func (Field *BinarySet) Add(a *dynamodb.AttributeValue) *UpdateExpression

func (*BinarySet) AddFloat added in v1.0.2

func (Field *BinarySet) AddFloat(a float64) *UpdateExpression

func (*BinarySet) AddInteger added in v1.0.2

func (Field *BinarySet) AddInteger(a int64) *UpdateExpression

func (*BinarySet) AddString added in v1.0.2

func (Field *BinarySet) AddString(a string) *UpdateExpression

func (*BinarySet) Delete added in v1.0.2

func (Field *BinarySet) Delete(a *dynamodb.AttributeValue) *UpdateExpression

func (*BinarySet) DeleteFloat added in v1.0.2

func (Field *BinarySet) DeleteFloat(a float64) *UpdateExpression

func (*BinarySet) DeleteInteger added in v1.0.2

func (Field *BinarySet) DeleteInteger(a int64) *UpdateExpression

func (*BinarySet) DeleteString added in v1.0.2

func (Field *BinarySet) DeleteString(a string) *UpdateExpression

type Bool

type Bool struct {
	// contains filtered or unexported fields
}

Bool - A boolean dynamo field

func BoolField

func BoolField(name string) Bool

StringField ... A constructor for a string dynamo field

type Condition

type Condition struct {
	// contains filtered or unexported fields
}

func (Condition) String

func (c Condition) String() string

type DynamoDBIFace

DynamoDBIFace is the interface to the underlying aws dynamo db api

type DynamoDBValue

type DynamoDBValue map[string]*dynamodb.AttributeValue

type DynamoField

type DynamoField struct {
	// contains filtered or unexported fields
}

func (*DynamoField) Between

func (p *DynamoField) Between(a interface{}, b interface{}) KeyCondition

func (*DynamoField) Equals

func (p *DynamoField) Equals(a interface{}) KeyCondition

func (*DynamoField) Exists

func (p *DynamoField) Exists() Condition

Exists constructs a existential condition filter

func (*DynamoField) GreaterThan

func (p *DynamoField) GreaterThan(a interface{}) KeyCondition

func (*DynamoField) GreaterThanOrEq

func (p *DynamoField) GreaterThanOrEq(a interface{}) KeyCondition

func (*DynamoField) In

func (p *DynamoField) In(elems ...interface{}) Condition

In constructs a list inclusion condition filter

func (DynamoField) IsEmpty

func (d DynamoField) IsEmpty() bool

func (*DynamoField) LessThan

func (p *DynamoField) LessThan(a interface{}) KeyCondition

func (*DynamoField) LessThanOrEq

func (p *DynamoField) LessThanOrEq(a interface{}) KeyCondition

func (DynamoField) Name

func (d DynamoField) Name() string

func (*DynamoField) NotEquals

func (p *DynamoField) NotEquals(a interface{}) KeyCondition

func (*DynamoField) NotExists

func (p *DynamoField) NotExists() Condition

NotExists constructs a existential exclusion condition filter

func (*DynamoField) RemoveField

func (Field *DynamoField) RemoveField() *UpdateExpression

RemoveField removes a dynamo Field.

func (*DynamoField) SetField

func (Field *DynamoField) SetField(a interface{}, onlyIfEmpty bool) *UpdateExpression

SetField sets a dynamo Field. Set onlyIfEmpty to true if you want to prevent overwrites

func (DynamoField) Type

func (d DynamoField) Type() string

type DynamoFieldIFace

type DynamoFieldIFace interface {
	Name() string
	Type() string
	IsEmpty() bool
}

type DynamoTable

type DynamoTable struct {
	Name                   string
	PartitionKey           DynamoFieldIFace
	RangeKey               DynamoFieldIFace //Optional param. If no range key set to EmptyDynamoField()
	GlobalSecondaryIndexes []GlobalSecondaryIndex
	LocalSecondaryIndexes  []LocalSecondaryIndex
}

DynamoTable is a static table definition representing a dynamo table

func (DynamoTable) BatchGetItem

func (table DynamoTable) BatchGetItem(items ...KeyValue) *batchGetInput

BatchGetItem represents dynamo batch get item call

func (DynamoTable) BatchWriteItem

func (table DynamoTable) BatchWriteItem() *batchWriteInput

BatchWriteItem represents dynamo batch write item call

func (DynamoTable) CreateTable

func (table DynamoTable) CreateTable() *createTable

func (DynamoTable) DeleteItem

func (table DynamoTable) DeleteItem(key KeyValue) *deleteItemInput

DeleteItemInput represents dynamo delete item call

func (DynamoTable) DeleteTable

func (table DynamoTable) DeleteTable() *deleteTable

func (DynamoTable) GetItem

func (table DynamoTable) GetItem(key KeyValue) *getInput

GetItem Primary constructor for creating a get item query

func (DynamoTable) PutItem

func (table DynamoTable) PutItem(i interface{}) *putInput

PutItem represents dynamo put item call

func (DynamoTable) Query

func (table DynamoTable) Query(partitionKeyCondition KeyCondition, rangeKeyCondition *KeyCondition) *QueryInput

QueryInput represents dynamo batch get item call

func (DynamoTable) Scan

func (table DynamoTable) Scan() (q *ScanInput)

ScanOutput represents dynamo scan item call

func (DynamoTable) UpdateItem

func (table DynamoTable) UpdateItem(key KeyValue) *UpdateInput

UpdateInputItem represents dynamo batch get item call

type Empty

type Empty struct {
	DynamoField
}

Empty - An empty dynamo field

func EmptyField

func EmptyField() Empty

EmptyField ... A constructor for an empty dynamo field

type Expression

type Expression interface {
	// contains filtered or unexported methods
}

Expression represents a dynamo Condition expression, i.e. And(if_empty(...), size(path) >0)

type ExpressionGroup

type ExpressionGroup struct {
	// contains filtered or unexported fields
}

func And

func And(c ...Expression) ExpressionGroup

And represents a dynamo AND expression. All expressions are and'd together

func Or

func Or(c ...Expression) ExpressionGroup

Or represents a dynamo OR expression. All expressions are or'd together

func (ExpressionGroup) String

func (c ExpressionGroup) String() string

String stringifies expressions for easy debugging

type GlobalSecondaryIndex

type GlobalSecondaryIndex struct {
	Name             string
	PartitionKey     DynamoFieldIFace
	RangeKey         DynamoFieldIFace //Optional param. If no range key set to EmptyField
	ProjectionType   string
	NonKeyAttributes []DynamoFieldIFace
	ReadUnits        int64
	WriteUnits       int64
}

GlobalSecondaryIndex ... Represents a dynamo global secondary index

type KeyCondition

type KeyCondition struct {
	Condition
}

type KeyValue

type KeyValue struct {
	PartitionKey interface{}
	RangeKey     interface{}
}

KeyValue ... A Key Value struct for use in GetItem and BatchWriteItem queries

type Keys

type List

type List struct {
	// contains filtered or unexported fields
}

List - A list dynamo field

func ListField

func ListField(name string) List

ListField ... A constructor for a list dynamo field

func (*List) Append

func (Field *List) Append(a interface{}) *UpdateExpression

Append appends an element to a list Field

func (*List) Remove added in v1.0.2

func (Field *List) Remove(index int) *UpdateExpression

func (*List) Set added in v1.0.2

func (Field *List) Set(index int, a interface{}) *UpdateExpression

type Loader

type Loader interface {
	LoadDynamoDBValue(av DynamoDBValue) (err error)
}

Loader is the interface that specifies the ability to deserialize and load data from dynamodb attrbiute value map

type LocalSecondaryIndex

type LocalSecondaryIndex struct {
	Name             string
	PartitionKey     DynamoFieldIFace
	SortKey          DynamoFieldIFace
	ProjectionType   string
	NonKeyAttributes []DynamoFieldIFace
}

LocalSecondaryIndex ... Represents a dynamo local secondary index

type Map

type Map struct {
	// contains filtered or unexported fields
}

Map - A map dynamo field

func MapField

func MapField(name string) Map

MapField ... A constructor for a map dynamo field

func (*Map) Remove added in v1.0.2

func (Field *Map) Remove(key string) *UpdateExpression

RemoveKey removes an element from a map Field

func (*Map) Set added in v1.0.2

func (Field *Map) Set(key string, a interface{}) *UpdateExpression

type Numeric

type Numeric struct {
	// contains filtered or unexported fields
}

Numeric - A numeric dynamo field

func NumericField

func NumericField(name string) Numeric

NumericField ... A constructor for a numeric dynamo field

func (*Numeric) Add

func (Field *Numeric) Add(amount float64) *UpdateExpression

Add adds an amount to dynamo numeric Field

func (*Numeric) Decrement

func (Field *Numeric) Decrement(by uint) *UpdateExpression

Decrement a numeric counter Field

func (*Numeric) Increment

func (Field *Numeric) Increment(by uint) *UpdateExpression

Increment a numeric counter Field

type NumericSet

type NumericSet struct {
	// contains filtered or unexported fields
}

NumericSet - A numeric set dynamo field

func NumericSetField

func NumericSetField(name string) NumericSet

NumericSetField ... A constructor for a numeric set dynamo field

func (*NumericSet) Add added in v1.0.2

func (Field *NumericSet) Add(a *dynamodb.AttributeValue) *UpdateExpression

func (*NumericSet) AddFloat added in v1.0.2

func (Field *NumericSet) AddFloat(a float64) *UpdateExpression

func (*NumericSet) AddInteger added in v1.0.2

func (Field *NumericSet) AddInteger(a int64) *UpdateExpression

func (*NumericSet) AddString added in v1.0.2

func (Field *NumericSet) AddString(a string) *UpdateExpression

func (*NumericSet) Delete added in v1.0.2

func (Field *NumericSet) Delete(a *dynamodb.AttributeValue) *UpdateExpression

func (*NumericSet) DeleteFloat added in v1.0.2

func (Field *NumericSet) DeleteFloat(a float64) *UpdateExpression

func (*NumericSet) DeleteInteger added in v1.0.2

func (Field *NumericSet) DeleteInteger(a int64) *UpdateExpression

func (*NumericSet) DeleteString added in v1.0.2

func (Field *NumericSet) DeleteString(a string) *UpdateExpression

type QueryInput

type QueryInput struct {
	*dynamodb.QueryInput
	// contains filtered or unexported fields
}

************************************************************************************* ********************************************* Query ********************************* *************************************************************************************

func (*QueryInput) Build

func (d *QueryInput) Build() *dynamodb.QueryInput

func (*QueryInput) ExecuteWith

func (d *QueryInput) ExecuteWith(ctx context.Context, db DynamoDBIFace, opts ...request.Option) (out *QueryOutput)

func (*QueryInput) SetAttributesToGet

func (d *QueryInput) SetAttributesToGet(fields []DynamoField) *QueryInput

func (*QueryInput) SetConsistentRead

func (d *QueryInput) SetConsistentRead(c bool) *QueryInput

func (*QueryInput) SetFilterExpression

func (d *QueryInput) SetFilterExpression(c Expression) *QueryInput

func (*QueryInput) SetGlobalIndex

func (d *QueryInput) SetGlobalIndex(idx GlobalSecondaryIndex) *QueryInput

func (*QueryInput) SetLimit

func (d *QueryInput) SetLimit(limit int) *QueryInput

func (*QueryInput) SetLocalIndex

func (d *QueryInput) SetLocalIndex(idx LocalSecondaryIndex) *QueryInput

func (*QueryInput) SetPageSize

func (d *QueryInput) SetPageSize(pageSize int) *QueryInput

func (*QueryInput) SetScanForward

func (d *QueryInput) SetScanForward(forward bool) *QueryInput

func (*QueryInput) WithConsumedCapacityHandler

func (d *QueryInput) WithConsumedCapacityHandler(f func(*dynamodb.ConsumedCapacity)) *QueryInput

func (*QueryInput) WithLastEvaluatedKey added in v1.0.3

func (d *QueryInput) WithLastEvaluatedKey(key DynamoDBValue) *QueryInput

type QueryOutput

type QueryOutput struct {
	// contains filtered or unexported fields
}

func (QueryOutput) ConditionalCheckFailed added in v1.0.2

func (r QueryOutput) ConditionalCheckFailed() (b bool)

func (QueryOutput) Error

func (r QueryOutput) Error() error

func (*QueryOutput) Results

func (o *QueryOutput) Results(next func() interface{}) (err error)

func (*QueryOutput) ResultsList added in v1.0.3

func (o *QueryOutput) ResultsList() (values []DynamoDBValue, LastEvaluatedKey DynamoDBValue, err error)

func (*QueryOutput) StreamWithChannel

func (o *QueryOutput) StreamWithChannel(channel interface{}) (errChan chan error)

type ScanInput

type ScanInput struct {
	*dynamodb.ScanInput
	// contains filtered or unexported fields
}

************************************************************************************* ********************************************* Scan ********************************* *************************************************************************************

func (*ScanInput) Build

func (d *ScanInput) Build() *dynamodb.ScanInput

func (*ScanInput) ExecuteWith

func (d *ScanInput) ExecuteWith(ctx context.Context, db DynamoDBIFace, opts ...request.Option) (out *ScanOutput)

*

** ExecuteWith ... Execute a dynamo Scan call with a passed in dynamodb instance and next item pointer
** dynamo - The underlying dynamodb api
** nextItem - The item pointer function, which is called on each new object returned from dynamodb. The function SHOULD NOT
** 		   store each item. It should simply return an empty struct pointer. Each of which is hydrated and pushed on
** 		   the returned channel.
**

func (*ScanInput) SetAttributesToGet

func (d *ScanInput) SetAttributesToGet(fields []DynamoField) *ScanInput

func (*ScanInput) SetConsistentRead

func (d *ScanInput) SetConsistentRead(c bool) *ScanInput

func (*ScanInput) SetFilterExpression

func (d *ScanInput) SetFilterExpression(c Expression) *ScanInput

func (*ScanInput) SetGlobalIndex

func (d *ScanInput) SetGlobalIndex(idx GlobalSecondaryIndex) *ScanInput

func (*ScanInput) SetLimit

func (d *ScanInput) SetLimit(limit int) *ScanInput

func (*ScanInput) SetLocalIndex

func (d *ScanInput) SetLocalIndex(idx LocalSecondaryIndex) *ScanInput

func (*ScanInput) SetPageSize

func (d *ScanInput) SetPageSize(pageSize int) *ScanInput

func (*ScanInput) WithLastEvaluatedKey added in v1.0.3

func (d *ScanInput) WithLastEvaluatedKey(key DynamoDBValue) *ScanInput

type ScanOutput

type ScanOutput struct {
	Error error
	// contains filtered or unexported fields
}

func (ScanOutput) ConditionalCheckFailed added in v1.0.2

func (r ScanOutput) ConditionalCheckFailed() (b bool)

func (ScanOutput) Error

func (r ScanOutput) Error() error

func (*ScanOutput) Results

func (o *ScanOutput) Results(next func() interface{}) (err error)

func (*ScanOutput) ResultsList added in v1.0.3

func (o *ScanOutput) ResultsList() (values []DynamoDBValue, LastEvaluatedKey DynamoDBValue, err error)

func (*ScanOutput) StreamWithChannel

func (o *ScanOutput) StreamWithChannel(channel interface{}) (errChan chan error)

type String

type String struct {
	// contains filtered or unexported fields
}

String - A string dynamo field

func StringField

func StringField(name string) String

StringField ... A constructor for a string dynamo field

func (*String) BeginsWith added in v1.0.2

func (p *String) BeginsWith(a interface{}) KeyCondition

func (*String) Contains added in v1.0.2

func (p *String) Contains(a string) Condition

Contains constructs a string inclusion condition filter

func (*String) Size added in v1.0.2

func (p *String) Size(op string, a int) Condition

* Size constructs a string length condition filter * table.someStringField.Size(">=", 5)

type StringSet

type StringSet struct {
	// contains filtered or unexported fields
}

StringSet - A string set dynamo field

func StringSetField

func StringSetField(name string) StringSet

StringSetField ... A constructor for a string set dynamo field

func (*StringSet) Add added in v1.0.2

func (Field *StringSet) Add(a *dynamodb.AttributeValue) *UpdateExpression

func (*StringSet) AddFloat added in v1.0.2

func (Field *StringSet) AddFloat(a float64) *UpdateExpression

func (*StringSet) AddInteger added in v1.0.2

func (Field *StringSet) AddInteger(a int64) *UpdateExpression

func (*StringSet) AddString added in v1.0.2

func (Field *StringSet) AddString(a string) *UpdateExpression

func (*StringSet) Delete added in v1.0.2

func (Field *StringSet) Delete(a *dynamodb.AttributeValue) *UpdateExpression

func (*StringSet) DeleteFloat added in v1.0.2

func (Field *StringSet) DeleteFloat(a float64) *UpdateExpression

func (*StringSet) DeleteInteger added in v1.0.2

func (Field *StringSet) DeleteInteger(a int64) *UpdateExpression

func (*StringSet) DeleteString added in v1.0.2

func (Field *StringSet) DeleteString(a string) *UpdateExpression

type TableName

type TableName string

type ToValue

type ToValue interface {
	ToDynamoDBValue() (bm interface{})
}

ToValue is the interface that specifies the ability to serialize data to a value that can be persisted in dynamodb

type UpdateExpression

type UpdateExpression struct {
	// contains filtered or unexported fields
}

******************************************************************************* ******************************* Update Expressions **************************** *******************************************************************************

type UpdateInput

type UpdateInput struct {
	// contains filtered or unexported fields
}

************************************************************************************* ********************************** UpdateItem *************************************** *************************************************************************************

func (*UpdateInput) Build

func (d *UpdateInput) Build() (r *dynamodb.UpdateItemInput, err error)

func (*UpdateInput) ExecuteWith

func (d *UpdateInput) ExecuteWith(ctx context.Context, dynamo DynamoDBIFace, opts ...request.Option) (out *UpdateOutput)

*

** ExecuteWith ... Execute a dynamo BatchGetItem call with a passed in dynamodb instance
** ctx - an instance of context
** dynamo - The underlying dynamodb api
**

func (*UpdateInput) ReturnAllNew

func (d *UpdateInput) ReturnAllNew() *UpdateInput

func (*UpdateInput) ReturnAllOld

func (d *UpdateInput) ReturnAllOld() *UpdateInput

func (*UpdateInput) ReturnNone

func (d *UpdateInput) ReturnNone() *UpdateInput

func (*UpdateInput) ReturnUpdatedNew

func (d *UpdateInput) ReturnUpdatedNew() *UpdateInput

func (*UpdateInput) ReturnUpdatedOld

func (d *UpdateInput) ReturnUpdatedOld() *UpdateInput

func (*UpdateInput) SetConditionExpression

func (d *UpdateInput) SetConditionExpression(c Expression) *UpdateInput

func (*UpdateInput) SetUpdateExpression

func (d *UpdateInput) SetUpdateExpression(exprs ...*UpdateExpression) *UpdateInput

type UpdateOutput

type UpdateOutput struct {
	*dynamodb.UpdateItemOutput
	// contains filtered or unexported fields
}

func (UpdateOutput) ConditionalCheckFailed added in v1.0.2

func (r UpdateOutput) ConditionalCheckFailed() (b bool)

func (UpdateOutput) Error

func (r UpdateOutput) Error() error

func (*UpdateOutput) Result

func (o *UpdateOutput) Result(item interface{}) (err error)

Jump to

Keyboard shortcuts

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