Mercurial > libervia-pubsub
comparison sat_pubsub/pgsql_storage.py @ 466:0d38c3529972
psql: schema update (9) to add `roster` table
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 15 Oct 2021 13:40:59 +0200 |
parents | f520ac3164b0 |
children | d86e0f8a1405 |
comparison
equal
deleted
inserted
replaced
465:9af0ef2c145c | 466:0d38c3529972 |
---|---|
76 | 76 |
77 # parseXml manage str, but we get unicode | 77 # parseXml manage str, but we get unicode |
78 parseXml = lambda unicode_data: generic.parseXml(unicode_data.encode('utf-8')) | 78 parseXml = lambda unicode_data: generic.parseXml(unicode_data.encode('utf-8')) |
79 ITEMS_SEQ_NAME = 'node_{node_id}_seq' | 79 ITEMS_SEQ_NAME = 'node_{node_id}_seq' |
80 PEP_COL_NAME = 'pep' | 80 PEP_COL_NAME = 'pep' |
81 CURRENT_VERSION = '8' | 81 CURRENT_VERSION = '9' |
82 # retrieve the maximum integer item id + 1 | 82 # retrieve the maximum integer item id + 1 |
83 NEXT_ITEM_ID_QUERY = r"SELECT COALESCE(max(item::integer)+1,1) as val from items where node_id={node_id} and item ~ E'^\\d+$'" | 83 NEXT_ITEM_ID_QUERY = r"SELECT COALESCE(max(item::integer)+1,1) as val from items where node_id={node_id} and item ~ E'^\\d+$'" |
84 | 84 |
85 | 85 |
86 def withPEP(query, values, pep, recipient): | 86 def withPEP(query, values, pep, recipient): |