#NEWLINE# def get_next_pkey_value( self , table , **kw ) : #NEWLINE# #INDENT# 'Next value of the primary key.\n\n        Mandatory positional arguments:\n        cursor -- the cursor\n        table -- name of the table\n\n        Optional keyword arguments:\n        pkey_seq_name -- if None (default), assume that the primary key sequence name has the\n                         form "<table>_<table>_id_seq"\n        debug_print -- print query before executing it (default False)\n        debug_assert -- throw assert exception (showing query), without executing it;\n                        useful for web dev debugging (default False)\n\n        ' #NEWLINE# _check_args ( 'get_current_pkey_value' , kw . keys ( ) , ( 'pkey_seq_name' , 'debug_print' , 'debug_assert' ) ) #NEWLINE# pkey_seq_name = kw . pop ( 'pkey_seq_name' , ( '%s_%s_id_seq' % ( table , table ) ) ) #NEWLINE# self . _exec_query ( 'select nextval(%s)' , [ pkey_seq_name ] , ** kw ) #NEWLINE# return self . cursor . fetchone ( ) [ 'nextval' ]