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)
140140 return leadersock ;
141141}
142142
143+ char * raftable_get (char * key )
144+ {
145+ return state_get (shared .state , key );
146+ }
147+
143148Datum
144149raftable_sql_get (PG_FUNCTION_ARGS )
145150{
@@ -244,6 +249,21 @@ raftable_sql_set(PG_FUNCTION_ARGS)
244249 PG_RETURN_VOID ();
245250}
246251
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+
247267Datum
248268raftable_sql_list (PG_FUNCTION_ARGS )
249269{
You can’t perform that action at this time.
0 commit comments