Skip to content

Support if_not_exist, list_append UpdateExpression functions #139

@numberoverzero

Description

@numberoverzero

Building on #136 there are two functions that could be exposed as additional values for ActionType: if_not_exist and list_append

The if_not_exist function is a conditional SET. This should be straightforward:

bloop.actions.if_not_exist("new_value")

The list_append function appends two lists:

# add to end of list
user.aliases = bloop.actions.list_append(User.aliases, ["n0"])

# add to front of list
user.aliases = bloop.actions.list_append(["n0"], User.aliases)

# does this work?  two column references no literals
user.aliases = bloop.actions.list_append(User.some_list, User.other_list)

# what about this? two literals no column references
user.aliases = bloop.actions.list_append(["n0"], ["n/0"])

Keeping in mind that list_append requires two values it may be easier to add if_not_exist for now and tackle list_append when there's a concrete user need to build against.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions