Skip to content

Commit 546bc70

Browse files
committed
Update API in raftable README.
1 parent dc59786 commit 546bc70

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contrib/raftable/README

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,26 @@ The backend can also issue commands to itself through C API.
3636

3737
C API:
3838
/* Gets value by key. Returns the value or NULL if not found. */
39-
char *raftable_get(int key);
39+
char *raftable_get(char *key);
4040

4141
/*
4242
* Adds/updates value by key. Returns when the value gets replicated on
4343
* current machine. Storing NULL will delete the item from the table.
4444
*/
45-
void raftable_set(int key, char *value);
45+
void raftable_set(char *key, char *value);
4646

4747
/*
4848
* Iterates over all items in the table, calling func(key, value, arg)
4949
* for each of them.
5050
*/
51-
void raftable_every(void (*func)(int, char *, void *), void *arg);
51+
void raftable_every(void (*func)(char *, char *, void *), void *arg);
5252

5353
SQL API:
5454
-- set
55-
raftable(key int, value text);
55+
raftable(key varchar(64), value text);
5656

5757
-- get
58-
raftable(key int) returns text;
58+
raftable(key varchar(64)) returns text;
5959

6060
-- list
61-
raftable() returns table (key int, value text);
61+
raftable() returns table (key varchar(64), value text);

0 commit comments

Comments
 (0)