view src/lib-sql/sql-db-cache.h @ 22656:1789bf2a1e01

director: Make sure HOST-RESET-USERS isn't used with max_moving_users=0 The reset command would just hang in that case. doveadm would never have sent this, so this is just an extra sanity check.
author Timo Sirainen <>
date Sun, 05 Nov 2017 23:51:56 +0200
parents e0d02ae9d50f
line wrap: on
line source

#ifndef SQL_DB_CACHE_H
#define SQL_DB_CACHE_H

struct sql_db_cache;

/* Like sql_init(), but use a connection pool. */
struct sql_db *
sql_db_cache_new(struct sql_db_cache *cache,
		 const char *db_driver, const char *connect_string);

struct sql_db_cache *sql_db_cache_init(unsigned int max_unused_connections);
void sql_db_cache_deinit(struct sql_db_cache **cache);