aboutsummaryrefslogtreecommitdiff
path: root/src/lib-sql/sql-api-private.h
AgeCommit message (Collapse)AuthorLines
2022-12-12lib-sql: Add sql_statement_set_no_log_expanded_values()Markus Valentin-0/+3
This allows to store no_log_expanded_values to sql_statement.
2022-12-12cassandra: Rename query to log_query and initialize it with ↵Markus Valentin-0/+1
sql_statement_get_log_query() Also add sql_statement_get_log_query() to sql-api.
2021-09-29lib-sql: Add "wait" vfuncSiavash Tavakoli-0/+1
To be used in backends that support async operations. On deinit dicts should wait for results and then exit.
2021-05-25lib-sql: Add sql_db_vfuncs.get_flags()Timo Sirainen-0/+2
2019-09-20lib-sql: Initialize sqlpool db properlyTimo Sirainen-0/+1
Fixes a crash at sql_unref() caused by recent changes.
2019-09-16lib-sql: Try to reuse prepared statements if possibleTimo Sirainen-0/+2
2019-09-16lib-sql: Fix the new sql_db refcounting to work with sql-db-cacheTimo Sirainen-0/+1
2019-09-16lib-sql: Add refcounting to sql_dbTimo Sirainen-0/+1
2019-09-16lib-sql: Move query_template to struct sql_prepared_statement directlyTimo Sirainen-0/+1
2018-09-04lib-sql: Add eventsAki Tuomi-0/+25
2018-09-04driver-sqlpool: Add driver_sqlpool_init_fullAki Tuomi-0/+2
Needed by SQL API change
2018-09-04lib-sql: Add init_full vfunctionAki Tuomi-0/+2
2017-09-08lib-sql: Add support for prepared SQL statements.Timo Sirainen-0/+40
This initial implementation doesn't use prepared statements in drivers, but simply generates the query string internally.
2017-07-17lib-sql: Add API support for asynchronously iterating over rows.Timo Sirainen-0/+2
sql_query() can already do an async lookup, but the full result needs to be available immediately. This can be inefficient for large results. Add a new SQL_RESULT_NEXT_MORE return value and sql_result_more() for asynchronously requesting more results. This changes the API a bit, but isn't done by default by any drivers yet. Also callers that can't handle this are hopefully checking for "ret < 0", which allows them to handle such an async-more request as an error instead. sql_result_next_row() will be changed to return enum in a separate commit to keep backwards compatibility in v2.2.x.
2016-07-17lib-sql: Added sql_result_get_error_type().Timo Sirainen-0/+1
For now the only special error type is SQL_RESULT_ERROR_TYPE_WRITE_UNCERTAIN.
2016-06-06global: unsigned int:1 -> bool:1Timo Sirainen-4/+4
perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch]
2015-09-02lib-sql: Implemented sql_escape_blob()Timo Sirainen-0/+2
2012-08-19Array API changed: ARRAY_DEFINE(name, type) -> ARRAY(type) nameTimo Sirainen-1/+1
Easy way to update your existing code: perl -i -pe 's:ARRAY_DEFINE\(([^,]+), *([^)]+)\);:ARRAY($2) $1;:' **/*.[ch]
2011-09-15lib-sql: Dropped connect timeout to 5 seconds.Timo Sirainen-1/+1
Postfix is using 10 second auth timeout and this needs to be less than that.
2010-05-28lib-sql: Don't try to reconnect on deinit or intentional disconnect. Fixes a ↵Timo Sirainen-0/+2
timeout leak. --HG-- branch : HEAD
2010-05-04lib-sql: Use generic sql connection pooling code for mysql/pgsql.Timo Sirainen-2/+69
It's possible to give multiple host settings to do load balancing / HA. If one host is down, another one is tried. All queries are automatically retried in another host if they fail in first one. Since PostgreSQL support async queries, Dovecot can create multiple connections to the database as needed, so it can do lookups in parallel. The number of connections can be changed with maxconns=n in connect_query, the default is 5. --HG-- branch : HEAD
2009-09-06lib-sql: Added sql_update_get_rows().Timo Sirainen-1/+2
--HG-- branch : HEAD
2009-05-12SQL API change: SQL results can be now refed/unrefed.Timo Sirainen-0/+1
--HG-- branch : HEAD
2007-09-22Added module_contexts to struct sql_db.Timo Sirainen-2/+17
--HG-- branch : HEAD
2007-09-16Changed .h ifdef/defines to use <NAME>_H format.Timo Sirainen-2/+2
--HG-- branch : HEAD
2007-04-03Added sql_result_setup_fetch() which makes it easier to fetch rows intoTimo Sirainen-3/+22
structures. Added sql_result_get_field_value_binary(), which is currently not implemented for MySQL. --HG-- branch : HEAD
2006-07-01sql_escape_string() should return const char *, not char *.Timo Sirainen-1/+1
--HG-- branch : HEAD
2006-06-28Array API redesigned to work using unions. It now provides type safetyTimo Sirainen-1/+3
without having to enable DEBUG, as long as the compiler supports typeof(). Its API changed a bit. It now allows directly accessing the array contents, although that's not necessarily recommended. Changed existing array usage to be type safe in a bit more places. Removed array_t completely. Also did s/modifyable/modifiable/. --HG-- branch : HEAD
2006-05-31Added sql_escape_string()Timo Sirainen-0/+1
--HG-- branch : HEAD
2006-01-27Added support for dynamically building SQL drivers.Timo Sirainen-4/+1
--HG-- branch : HEAD
2006-01-22SQLite support. Patch by Jakob Hirsch.Timo Sirainen-0/+1
--HG-- branch : HEAD
2005-12-10Added support for transactions and synchronous SQL queries.Timo Sirainen-0/+20
--HG-- branch : HEAD
2005-06-09Added sql_connect() to do explicit connecting. sql_init() no longer does.Timo Sirainen-0/+1
--HG-- branch : HEAD
2005-02-27Added sql_get_flags() function, currently returning onlyTimo Sirainen-0/+2
SQL_DB_FLAG_BLOCKING. --HG-- branch : HEAD
2004-10-16Created generic asynchronous SQL API and implemented MySQL and PostgreSQLTimo Sirainen-0/+39
drivers. MySQL is implemented synchronously because it's API doesn't provide async way to do it. Replaced pgsql and mysql userdb/passdb with generic sql userdb/passdb. --HG-- branch : HEAD