2017-07-14 13:40:31 +00:00
|
|
|
#ifndef SCHEME_MGR_H
|
|
|
|
#define SCHEME_MGR_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Odissey.
|
|
|
|
*
|
|
|
|
* Advanced PostgreSQL connection pooler.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct od_schememgr od_schememgr_t;
|
|
|
|
|
|
|
|
struct od_schememgr
|
|
|
|
{
|
2017-08-03 14:03:37 +00:00
|
|
|
uint64_t version;
|
2017-07-14 13:40:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
od_schememgr_init(od_schememgr_t *mgr)
|
|
|
|
{
|
|
|
|
mgr->version = 0;
|
|
|
|
}
|
|
|
|
|
2017-08-03 14:03:37 +00:00
|
|
|
static inline uint64_t
|
2017-07-14 13:40:31 +00:00
|
|
|
od_schememgr_version(od_schememgr_t *mgr)
|
|
|
|
{
|
|
|
|
return mgr->version;
|
|
|
|
}
|
|
|
|
|
2017-08-03 14:03:37 +00:00
|
|
|
static inline uint64_t
|
2017-07-14 13:40:31 +00:00
|
|
|
od_schememgr_version_next(od_schememgr_t *mgr)
|
|
|
|
{
|
|
|
|
return ++mgr->version;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* SCHEME_MGR_H */
|