Skip to content

Instantly share code, notes, and snippets.

Created March 21, 2012 10:17
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 anonymous/2145982 to your computer and use it in GitHub Desktop.
Save anonymous/2145982 to your computer and use it in GitHub Desktop.
Db.fresh_key compilation error
Error
File "main.opa", line 3, characters 8-18, (3:8-3:18 | 40-50)
Expression has a record type incompatible for access to field fresh_key. Its
type, limited to the most probable fields you want to access, is
{ build: !for all 'a 'b 'c . Db.builder('a, 'b, 'c) -> Db.path('a, 'b, 'c);
exists: !for all 'd 'e 'f . Db.path('d, 'e, 'f) -> bool;
get_engine: !for all 'g 'h 'i . Db.path('g, 'h, 'i) -> 'i;
get_val: !for all 'j 'k . Db.ref_path('j, 'k) -> Db.val_path('j, 'k);
read: !for all 'l 'm 'n . Db.path('l, 'm, 'n) -> 'm;
remove: !for all 'o 'p . Db.ref_path('o, 'p) -> void;
write: !for all 'q 'r . Db.ref_path('q, 'r), 'q -> { } }.
Hint:
Perhaps you meant remove or read ?
database intmap(string) /users
key = Db.fresh_key(@/users)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment