Hacker News new | past | comments | ask | show | jobs | submit login

I did find an example of an atomic increment in Faunadb. Sometimes SQL is easier :) :

  Update(
    Ref(
        Collection('topics'),
        '254119747652682260'
    ),
    { 
        data: { 
            clickCount: Add(
                Select(
                    ['data','clickCount'],
                    Get(
                        Ref(
                            Collection('topics'),
                            '254119747652682260'
                        )
                    )
                ),
                1
            )
        }
    }
  )



Applications are open for YC Winter 2022

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: