Vladislav
Vladislav
There are at least two common approaches to optimistic locking I know: * using a `where version = ?` clause * using a `returning version` and checking versions in code...
Having `repo.Delete(ctx, &model, rel.Unscoped())` is not possible with the current signature, which accepts only a bool vararg for cascades. It it possible to change Delete() to accept mutates or must...
> This could be a nice addition, maybe we need to think REL API (how to integrate it to existing api) to support them first, do you have anything in...
The solution I see is: 1. Getting the lua-cjson files from github.com/mpx/lua-cjson - We only need a subset of its files. `add_third_party` currently uses `ExternalProject_Add`. I'm not sure whether its...
> you also have an option to just copy the files Yes, this would be even easier if this is ok. I was just skeptical of keeping files around locally...
> I do not mind adding 3rd party lua modules under src/redis/lua > build them separately Got it. So I'll add each project with its native make file and trigger...
Lets start with watch & unwatch ### How Redis does it The whole management is really simple: - `struct watchedKey` stores basic info (key, db, client) - WATCH adds a...
> And then during EVAL we will do an additional transactional "hop" that queries DbTables regarding the state of those keys The purpose of DbTable's watched table is that EXEC...
> how another shard will know to update those keys in those connections? There is obviously no way for it > key->unsigned mapping for versioning Yes. If we use simple...
There is no double-sided dependency. The key just cares for itself, but it stores a timestamp with its own last update time (we'll have to add it at some point...