File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,11 @@ static int get_connection(void)
140
140
return leadersock ;
141
141
}
142
142
143
+ char * raftable_get (char * key )
144
+ {
145
+ return state_get (shared .state , key );
146
+ }
147
+
143
148
Datum
144
149
raftable_sql_get (PG_FUNCTION_ARGS )
145
150
{
@@ -244,6 +249,21 @@ raftable_sql_set(PG_FUNCTION_ARGS)
244
249
PG_RETURN_VOID ();
245
250
}
246
251
252
+ void raftable_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
+
247
267
Datum
248
268
raftable_sql_list (PG_FUNCTION_ARGS )
249
269
{
You can’t perform that action at this time.
0 commit comments