Skip to content

Instantly share code, notes, and snippets.

@lu-zen
lu-zen / default.esdl
Created May 5, 2023 19:41
edgedb unlessConflict rewrite error
module default {
abstract type Auditable {
required property created_at -> datetime {
readonly := true;
default := datetime_of_statement();
};
property updated_at -> datetime {
rewrite update using (
datetime_of_statement()
)

Keybase proof

I hereby claim:

  • I am lu-zen on github.
  • I am sirluis (https://keybase.io/sirluis) on keybase.
  • I have a public key ASDn3B2-AsuUI9MAU17fNSuJKoW3L2k9kHCjut5FBZNKHwo

To claim this, I am signing this object:

@lu-zen
lu-zen / promises.md
Created September 10, 2016 07:04 — forked from domenic/promises.md
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.