Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd1a4564

Browse files
committed
Add missing C API implementations to raftable.
1 parent535c5a2 commitd1a4564

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

‎contrib/raftable/raftable.c‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ static int get_connection(void)
140140
returnleadersock;
141141
}
142142

143+
char*raftable_get(char*key)
144+
{
145+
returnstate_get(shared.state,key);
146+
}
147+
143148
Datum
144149
raftable_sql_get(PG_FUNCTION_ARGS)
145150
{
@@ -244,6 +249,21 @@ raftable_sql_set(PG_FUNCTION_ARGS)
244249
PG_RETURN_VOID();
245250
}
246251

252+
voidraftable_every(void (*func)(char*,char*,void*),void*arg)
253+
{
254+
void*scan;
255+
char*key,*value;
256+
Assert(shared.state);
257+
258+
scan=state_scan(shared.state);
259+
while (state_next(shared.state,scan,&key,&value))
260+
{
261+
func(key,value,arg);
262+
pfree(key);
263+
pfree(value);
264+
}
265+
}
266+
247267
Datum
248268
raftable_sql_list(PG_FUNCTION_ARGS)
249269
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp