9f0fc74e3387d3e496fb0c8f77633e27e48cc1ff |
|
08-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-sql: Add support for prepared SQL statements.
This initial implementation doesn't use prepared statements in drivers, but
simply generates the query string internally. |
402f9bcf48cbccc17fdb5f3ea411a7967aed0fd0 |
|
17-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-sql: Add API support for asynchronously iterating over rows.
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. |
1601169d6f6004e0656238ed7691c16f3aab61aa |
|
17-Jul-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-sql: Added sql_result_get_error_type().
For now the only special error type is SQL_RESULT_ERROR_TYPE_WRITE_UNCERTAIN. |
0dffa25d211be541ee3c953b23566a1a990789df |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: unsigned int:1 -> bool:1
perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch] |
b87761f9bbef949f31dae297e619ac3f5e9c2b2e |
|
02-Sep-2015 |
Timo Sirainen <tss@iki.fi> |
lib-sql: Implemented sql_escape_blob() |
4ee00532a265bdfb38539d811fcd12d51210ac35 |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Array API changed: ARRAY_DEFINE(name, type) -> ARRAY(type) name
Easy way to update your existing code:
perl -i -pe 's:ARRAY_DEFINE\(([^,]+), *([^)]+)\);:ARRAY($2) $1;:' **/*.[ch] |
44e5c39db5002ab15db142dda6c42e0422a17437 |
|
15-Sep-2011 |
Timo Sirainen <tss@iki.fi> |
lib-sql: Dropped connect timeout to 5 seconds.
Postfix is using 10 second auth timeout and this needs to be less than that. |
4c9c55e15f35474f53f11659e796c63b1c34e884 |
|
28-May-2010 |
Timo Sirainen <tss@iki.fi> |
lib-sql: Don't try to reconnect on deinit or intentional disconnect. Fixes a timeout leak.
--HG--
branch : HEAD |
6b2738c39a868ff9291867138c55029fc40cf105 |
|
04-May-2010 |
Timo Sirainen <tss@iki.fi> |
lib-sql: Use generic sql connection pooling code for mysql/pgsql.
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 |
bfdf0fd7b6186f64cbdcbf1cb2bf9c42a9007b77 |
|
07-Sep-2009 |
Timo Sirainen <tss@iki.fi> |
lib-sql: Added sql_update_get_rows().
--HG--
branch : HEAD |
3656c91dcb8336814bebd4500e81c3dde25233e6 |
|
13-May-2009 |
Timo Sirainen <tss@iki.fi> |
SQL API change: SQL results can be now refed/unrefed.
--HG--
branch : HEAD |
0ae010139a1bb3b29fbf117c5da1a6a6c6b7b5a0 |
|
22-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Added module_contexts to struct sql_db.
--HG--
branch : HEAD |
c25356d5978632df6203437e1953bcb29e0c736f |
|
16-Sep-2007 |
Timo Sirainen <tss@iki.fi> |
Changed .h ifdef/defines to use <NAME>_H format.
--HG--
branch : HEAD |
1ac19c5c2b66a12f5598792aad15114ee3eb62e2 |
|
03-Apr-2007 |
Timo Sirainen <tss@iki.fi> |
Added sql_result_setup_fetch() which makes it easier to fetch rows into
structures. Added sql_result_get_field_value_binary(), which is currently
not implemented for MySQL.
--HG--
branch : HEAD |
13a8c553f293349248b161ff851743498916e26e |
|
01-Jul-2006 |
Timo Sirainen <tss@iki.fi> |
sql_escape_string() should return const char *, not char *.
--HG--
branch : HEAD |
8d80659e504ffb34bb0c6a633184fece35751b18 |
|
28-Jun-2006 |
Timo Sirainen <tss@iki.fi> |
Array API redesigned to work using unions. It now provides type safety
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 |
24ce0c343cefe54af841871fa39dbc3464028b06 |
|
31-May-2006 |
Timo Sirainen <tss@iki.fi> |
Added sql_escape_string()
--HG--
branch : HEAD |
0371406d952fe51367c7be91703e5634b7d9d225 |
|
26-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
Added support for dynamically building SQL drivers.
--HG--
branch : HEAD |
40f89fe7ec1898770d4d960ac3b6e5267c8aa3ea |
|
22-Jan-2006 |
Timo Sirainen <tss@iki.fi> |
SQLite support. Patch by Jakob Hirsch.
--HG--
branch : HEAD |
dc9de21d4375faeedbe5b7e941502ac578650da9 |
|
10-Dec-2005 |
Timo Sirainen <tss@iki.fi> |
Added support for transactions and synchronous SQL queries.
--HG--
branch : HEAD |
a0b89f3b1df99b3a32f44623f13ad1893118825b |
|
09-Jun-2005 |
Timo Sirainen <tss@iki.fi> |
Added sql_connect() to do explicit connecting. sql_init() no longer does.
--HG--
branch : HEAD |
ccffb125d94adff0ad776de5a96e22f864d6fb0a |
|
27-Feb-2005 |
Timo Sirainen <tss@iki.fi> |
Added sql_get_flags() function, currently returning only
SQL_DB_FLAG_BLOCKING.
--HG--
branch : HEAD |
6c2c5f20760b06bfb4a40b0ee2ef5ab016bc41f0 |
|
16-Oct-2004 |
Timo Sirainen <tss@iki.fi> |
Created generic asynchronous SQL API and implemented MySQL and PostgreSQL
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 |