Skip to content

Instantly share code, notes, and snippets.

@Marahin
Created May 21, 2020 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Marahin/868cb8d751b7a319a3940be5be791f33 to your computer and use it in GitHub Desktop.
Save Marahin/868cb8d751b7a319a3940be5be791f33 to your computer and use it in GitHub Desktop.
increment safely in faunadb
Update(
Select(
"ref",
Get(
Match(
Index("title_unique"),
"TITLE HERE "
)
)
),
{
data: {
users_ok: Add(
Select(
['data', 'users_ok'],
Get(
Match(
Index("title_unique"),
"TITLE HERE "
)
)
),
1
)
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment