aboutsummaryrefslogtreecommitdiff
path: root/src/lib-sql/sql-api.c
AgeCommit message (Collapse)AuthorLines
2022-12-12lib-sql: Add sql_statement_set_no_log_expanded_values()Markus Valentin-0/+8
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/+5
sql_statement_get_log_query() Also add sql_statement_get_log_query() to sql-api.
2021-09-29lib-sql: Add "wait" vfuncSiavash Tavakoli-0/+7
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-1/+4
2020-10-22global: Use SIZE_MAX instead of (size_t)-1Aki Tuomi-2/+2
2019-09-20lib-sql: Add asserts to make sure refcount unexpectedly doesn't drop below 1Timo Sirainen-0/+2
2019-09-20lib-sql: Initialize sqlpool db properlyTimo Sirainen-3/+8
Fixes a crash at sql_unref() caused by recent changes.
2019-09-16lib-sql: Rename sql_prepared_statement_deinit() to _unref()Timo Sirainen-1/+1
2019-09-16lib-sql: Keep prepared statements in memory until db is deinitializedTimo Sirainen-15/+27
There aren't supposed to be many different prepared statements.
2019-09-16lib-sql: Try to reuse prepared statements if possibleTimo Sirainen-2/+24
2019-09-16lib-sql: Fix the new sql_db refcounting to work with sql-db-cacheTimo Sirainen-0/+2
2019-09-16lib-sql: Add refcounting to sql_dbTimo Sirainen-1/+10
2019-09-16lib-sql: Move query_template to struct sql_prepared_statement directlyTimo Sirainen-17/+7
2019-01-10global: Use array_push_backAki Tuomi-1/+1
@@ expression A,I; @@ -array_append(A, I, 1) +array_push_back(A, I)
2018-09-05lib-sql: Do not create event for old driversAki Tuomi-2/+0
They can't use it anyways
2018-09-04lib-sql: Add eventsAki Tuomi-2/+54
2018-09-04lib-sql: Add init_full vfunctionAki Tuomi-9/+35
2018-01-01Updated copyright notices to include the year 2018.Stephan Bosch-1/+1
2017-09-20global: start relying on timeout_remove(NULL) being a no-opJosef 'Jeff' Sipek-4/+2
Cleanup performed with the following semantic patch: @@ expression E; @@ - if (E != NULL) { - timeout_remove(&E); - } + timeout_remove(&E);
2017-09-08lib-sql: Add support for prepared SQL statements.Timo Sirainen-0/+250
This initial implementation doesn't use prepared statements in drivers, but simply generates the query string internally.
2017-07-19lib-sql: Add assert to sql_result_more_s()Timo Sirainen-0/+2
Should avoid a warning from static analyzer.
2017-07-17lib-sql: Add API support for asynchronously iterating over rows.Timo Sirainen-1/+26
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.
2017-01-01Updated copyright notices to include the year 2017.Stephan Bosch-1/+1
2016-07-17lib-sql: Added sql_result_get_error_type().Timo Sirainen-0/+5
For now the only special error type is SQL_RESULT_ERROR_TYPE_WRITE_UNCERTAIN.
2016-01-13global: freshen copyrightTimo Sirainen-1/+1
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/'
2015-09-23Remove now-unnecessary direct stdlib.h #includes.Teemu Huovila-1/+0
2015-09-02lib-sql: Implemented sql_escape_blob()Timo Sirainen-0/+6
2015-01-05global: freshen copyrightPhil Carmody-1/+1
Robomatically: git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/' Happy 2015 everyone! Signed-off-by: Phil Carmody <phil@dovecot.fi>
2014-02-04Updated copyright notices to include year 2014.Timo Sirainen-1/+1
2013-02-02Oops :) Update copyrights to 2013 without breaking all .c files.Timo Sirainen-1/+1
2013-02-02Updated copyright notices to include year 2013.Timo Sirainen-1/+1
2012-06-24Marked functions parameters that are allowed to be NULL. Some APIs were also ↵Timo Sirainen-1/+1
changed. The non-obvious APIs where NULL parameter was changed to "" are master_service_init() and auth_master_user_list_init(). These checks can currently be enabled only on a patched clang: http://llvm.org/bugs/show_bug.cgi?id=6786
2012-02-12Updated copyright notices to include year 2012.Timo Sirainen-1/+1
2011-03-04Updated copyright notices to include year 2011.Timo Sirainen-1/+1
2010-08-12lib-sql: Fail if trying to register a duplicate sql driver.Timo Sirainen-14/+18
2010-05-04lib-sql: Use generic sql connection pooling code for mysql/pgsql.Timo Sirainen-12/+86
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
2010-04-07Started using str_to_*() functions instead of libc's ones.Timo Sirainen-8/+6
--HG-- branch : HEAD
2010-01-25Updated copyright notices to include year 2010.Timo Sirainen-1/+1
--HG-- branch : HEAD
2009-12-04Removed MEMBER() macro. Require C99 style struct initializer.Timo Sirainen-1/+1
--HG-- branch : HEAD
2009-09-06lib-sql: Added sql_update_get_rows().Timo Sirainen-1/+7
--HG-- branch : HEAD
2009-05-12SQL API change: SQL results can be now refed/unrefed.Timo Sirainen-1/+10
--HG-- branch : HEAD
2009-01-06Updated copyright notices to include year 2009.Timo Sirainen-1/+1
--HG-- branch : HEAD
2008-01-01Updated copyright notices to include year 2008.Timo Sirainen-1/+1
--HG-- branch : HEAD
2007-09-22Added sql_db_module_register for module_contexts users.Timo Sirainen-0/+1
--HG-- branch : HEAD
2007-09-22Let deinit() free all the memory itself after all.Timo Sirainen-2/+0
--HG-- branch : HEAD
2007-09-22Added module_contexts to struct sql_db.Timo Sirainen-16/+24
--HG-- branch : HEAD
2007-09-16Replaced my Copyright notices. The year range always ends with 2007 now.Timo Sirainen-1/+1
My name was replaced with "Dovecot authors". In many cases I didn't really even own the copyright, so this is more correct. --HG-- branch : HEAD
2007-09-16Renamed __attr_*__ to ATTR_*. Renamed __attrs_used__ to ATTRS_DEFINED.Timo Sirainen-4/+4
--HG-- branch : HEAD
2007-04-03Added sql_result_setup_fetch() which makes it easier to fetch rows intoTimo Sirainen-17/+137
structures. Added sql_result_get_field_value_binary(), which is currently not implemented for MySQL. --HG-- branch : HEAD
2006-12-15Added context parameter type safety checks for most callback APIs.Timo Sirainen-0/+2
--HG-- branch : HEAD