示例#1
0
// NewQuery returns a pointer to an instantiation of the Query struct.
func NewQuery() *Query {
	q := new(Query)
	q.AttributesToGet = attributestoget.NewAttributesToGet()
	q.ExclusiveStartKey = attributevalue.NewAttributeValueMap()
	q.ExpressionAttributeNames = expressionattributenames.NewExpressionAttributeNames()
	q.ExpressionAttributeValues = attributevalue.NewAttributeValueMap()
	q.KeyConditions = condition.NewConditions()
	q.QueryFilter = condition.NewConditions()
	return q
}
示例#2
0
func NewScan() *Scan {
	s := new(Scan)
	s.AttributesToGet = attributestoget.NewAttributesToGet()
	s.ExclusiveStartKey = attributevalue.NewAttributeValueMap()
	s.ExpressionAttributeNames = expressionattributenames.NewExpressionAttributeNames()
	s.ExpressionAttributeValues = attributevalue.NewAttributeValueMap()
	s.ScanFilter = condition.NewConditions()
	return s
}