From zwmosquito at 126.com Tue Jan 3 02:46:11 2017 From: zwmosquito at 126.com (Wayne Zhang) Date: Tue Jan 3 02:46:25 2017 Subject: [odb-users] Cross-compiling issue with ODB source code In-Reply-To: References: <309127bd.26bf.1594860da4f.Coremail.zwmosquito@126.com> Message-ID: <56daae66.832c.159634aed01.Coremail.zwmosquito@126.com> Hi boris! Thank you for saving me from the headless searching and trying! I didn't know there're so many choices for me until learning from your suggestions. >One thing you could try is use GCC from the official ODB package for RH >to build a newer ODB compiler directly on RH. I prefer this one, because ODB source and official ODB package ( it points to odb-2.4.0-x86_64-linux-gnu.tar.bz2, right? ) I have both of them on RH server. After simple tries, the ODB compile is built successfully on RH, and it could work as expect. Thanks again for your great help! I paste the configure commands that I used, in case somebody else who falling into the same trouble need it: 1. untar official ODB package tar jvxf odb-2.4.0-x86_64-linux-gnu.tar.bz2 -C /tmp/ 2. untar odb source tar jvxf odb-2.4.0.tar.bz2 -C /tmp/ 3. mkdir -p /tmp/odb-2.4.0/build && cd /tmp/odb-2.4.0/build 4. CC=/tmp/odb-2.4.0-x86_64-linux-gnu/lib/odb/x86_64-linux-gnu/bin/gcc CXX=/tmp/odb-2.4.0-x86_64-linux-gnu/lib/odb/x86_64-linux-gnu/bin/g++ CXXFLAGS=-I/tmp/odb-2.4.0-x86_64-linux-gnu/include/ LDFLAGS="-L/tmp/odb-2.4.0-x86_64-linux-gnu/lib -Wl,-rpath,/tmp/odb-2.4.0-x86_64-linux-gnu/lib/odb/x86_64-linux-gnu/lib/" ../configure --with-sysroot=/tmp/odb-2.4.0-x86_64-linux-gnu --prefix=/tmp/odb-2.4.0-x86_64-linux-gnu/ 5. make && make install Br, Wayne From davejohansen at gmail.com Tue Jan 3 10:30:53 2017 From: davejohansen at gmail.com (Dave Johansen) Date: Tue Jan 3 10:31:06 2017 Subject: [odb-users] Minimizing churn with gcc version? Message-ID: The question came up in regards to Fedora packaging if it's possible to minimize the churn when a gcc version changes, especially in light of the new versioning scheme for gcc ( https://bugzilla.redhat.com/show_bug.cgi?id=1408943#c6 ). Thanks, Dave From monkey526 at outlook.com Wed Jan 4 01:24:50 2017 From: monkey526 at outlook.com (=?utf-8?B?6LCiIOmSn+ixqg==?=) Date: Wed Jan 4 09:01:18 2017 Subject: [odb-users] How to custom pragma ? Message-ID: I want to change the source code of odb compiler to suit my idea ,Can I add something like #pragma db xxx to Setting permissions for my class?also add a property to the field.But I could't found the way to fix it and I don't know where's the source code file.Sorry for my English...T T Finally?hope to receive your reply. Thanks.[?] -------------- next part -------------- A non-text attachment was scrubbed... Name: =?utf-8?B?T3V0bG9va0Vtb2ppLfCfmIoucG5n?= Type: image/png Size: 488 bytes Desc: =?utf-8?B?T3V0bG9va0Vtb2ppLfCfmIoucG5n?= Url : http://codesynthesis.com/pipermail/odb-users/attachments/20170104/1a9cac29/utf-8BT3V0bG9va0Vtb2ppLfCfmIoucG5n.png From boris at codesynthesis.com Wed Jan 4 09:09:21 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Jan 4 09:09:30 2017 Subject: [odb-users] How to custom pragma ? In-Reply-To: References: Message-ID: Hi, monkey526@outlook.com writes: > I want to change the source code of odb compiler to suit my idea, Can > I add something like #pragma db xxx to Setting permissions for my class > also add a property to the field. Yes, this is possible though the code that handles this is pretty dense. > But I could't found the way to fix it and I don't know where's the > source code file. If you couldn't find the source file with the relevant code (BTW, called pragma.cxx), then I doubt you will have much luck figuring out what's going on inside. Boris From boris at codesynthesis.com Wed Jan 4 09:30:25 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Jan 4 09:30:33 2017 Subject: [odb-users] Minimizing churn with gcc version? In-Reply-To: References: Message-ID: Hi Dave, Dave Johansen writes: > The question came up in regards to Fedora packaging if it's possible to > minimize the churn when a gcc version changes, especially in light of the > new versioning scheme for gcc > > https://bugzilla.redhat.com/show_bug.cgi?id=1408943#c6 I've added a comment to the bug report. Boris From Rohith.Tenneti at fs.utc.com Sun Jan 8 22:02:08 2017 From: Rohith.Tenneti at fs.utc.com (Tenneti, Rohith UTC CCS) Date: Sun Jan 8 22:02:18 2017 Subject: [odb-users] Output of native SQL statement in SQLite. Message-ID: Hello, I am trying to capture the output of SQL statement in SQLite "PRAGMA integrity_check;" using : session s; transaction t( db->begin() ); numRows = db->execute("PRAGMA integrity_check"); t.commit(); As per the ODB manual, db->execute returns the number of rows affected. Is it possible to capture the output i.e., sqlite> pragma integrity_check; integrity_check --------------- Ok Thank you [cid:image003.png@01D07790.413FA370] Rohith Tenneti Firmware Engineer Control Panels & Interfaces EDWARDS Detection & Alarm 8985 Town Center Parkway Bradenton, FL 34202 Landline: (941) 739-4263 Email: Rohith.Tenneti@fs.utc.com Note: This message is intended only for the designated recipient(s). It may contain confidential or proprietary information and may be subject to the attorney-client privilege or other confidentiality protections. If you are not a designated recipient, you may not review, copy or distribute this message. If you receive this in error, please notify the sender by reply e-mail and delete this message. Thank you. -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 11350 bytes Desc: image001.png Url : http://codesynthesis.com/pipermail/odb-users/attachments/20170109/d512a98e/image001.png From boris at codesynthesis.com Mon Jan 9 09:21:52 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Jan 9 09:22:01 2017 Subject: [odb-users] Output of native SQL statement in SQLite. In-Reply-To: References: Message-ID: Hi Rohith, Tenneti, Rohith UTC CCS writes: > I am trying to capture the output of SQL statement in SQLite > "PRAGMA integrity_check;" using : > > session s; > transaction t( db->begin() ); > > numRows = db->execute("PRAGMA integrity_check"); > > t.commit(); According to the SQLite documentation, "If the integrity_check pragma finds problems, strings are returned (as multiple rows with a single column per row) which describe the problems. If pragma integrity_check finds no errors, a single row with the value 'ok' is returned." So in a sense it behaves like SELECT which means you can use a view to get the result: #pragma db view query("PRAGMA integrity_check") struct integrity_check { std::string problem; }; for (const integrity_check& ic: db.query ()) { cerr << ic.problem << endl; } Boris From Rohith.Tenneti at fs.utc.com Mon Jan 9 11:29:57 2017 From: Rohith.Tenneti at fs.utc.com (Tenneti, Rohith UTC CCS) Date: Mon Jan 9 11:30:39 2017 Subject: [odb-users] Output of native SQL statement in SQLite. Message-ID: Hello, Thanks for the reply, but ODB compiler gives an error with 1. #pragma db view query("PRAGMA integrity_check") struct integrity_check { std::string problem; }; error: view '::integrity_check' has an incomplete query template and no associated objects info: use db pragma query to provide a complete query template info: or use db pragma object to associate one or more objects with the view 2. I then tried, #pragma db view struct integrity_check { std::string problem; }; db->query < integrity_check >( "PRAGMA integrity_check" ); Which of course then resulted in a run time error at the PREPARE level as the query being executed was "WHERE PRAGMA integrity_check". Thank You -----Original Message----- From: Boris Kolpackov [mailto:boris@codesynthesis.com] Sent: Monday, January 09, 2017 9:22 AM To: Tenneti, Rohith UTC CCS Cc: odb-users@codesynthesis.com Subject: [External] Re: [odb-users] Output of native SQL statement in SQLite. Hi Rohith, Tenneti, Rohith UTC CCS writes: > I am trying to capture the output of SQL statement in SQLite "PRAGMA > integrity_check;" using : > > session s; > transaction t( db->begin() ); > > numRows = db->execute("PRAGMA integrity_check"); > > t.commit(); According to the SQLite documentation, "If the integrity_check pragma finds problems, strings are returned (as multiple rows with a single column per row) which describe the problems. If pragma integrity_check finds no errors, a single row with the value 'ok' is returned." So in a sense it behaves like SELECT which means you can use a view to get the result: #pragma db view query("PRAGMA integrity_check") struct integrity_check { std::string problem; }; for (const integrity_check& ic: db.query ()) { cerr << ic.problem << endl; } Boris From boris at codesynthesis.com Tue Jan 10 10:29:31 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jan 10 10:29:40 2017 Subject: [odb-users] Output of native SQL statement in SQLite. In-Reply-To: References: Message-ID: Hi Rohith, Tenneti, Rohith UTC CCS writes: > #pragma db view > struct integrity_check > { > std::string problem; > }; > > db->query < integrity_check >( "PRAGMA integrity_check" ); > > Which of course then resulted in a run time error at the PREPARE > level as the query being executed was "WHERE PRAGMA integrity_check". Ah, right, we don't consider PRAGMA as a complete statement. I've fixed this and the (tiny) patch for libodb-sqlite is available here: http://scm.codesynthesis.com/?p=odb/libodb-sqlite.git;a=patch;h=0d099d1930b1870db7f20761388b9772d0abfedc Boris From amir.thedev at gmail.com Tue Jan 17 06:06:55 2017 From: amir.thedev at gmail.com (Amir Developer) Date: Tue Jan 17 09:05:57 2017 Subject: [odb-users] linkage problems using mysql database Message-ID: Hi, I'm trying to compile and link the hello sample but with no luck. Env: Ubuntu 16.04.1 LTS Compiler: g++ 5.4.0 odb: installed through APT version 2.4.0 database: MySQL Compiling the person.hxx works fine with the following line used: odb -d mysql --generate-query --generate-schema person.hxx 4 files are generated as expected: person-odb.cxx person-odb.hxx person-odb.ixx person.sql compiled everything with the following lines: g++ -c person-odb.cxx g++ -DDATABASE_MYSQL -c driver.cxx the problem is when linking everything with the following line: g++ -o driver driver.o person-odb.o -lodb-mysql -lodb the error: /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodb-mysql.so: undefined reference to `odb::statement::process_insert(char const*, void const* const*, unsigned long, unsigned long, char, std::__cxx11::basic_string, std::allocator >&)' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodb-mysql.so: undefined reference to `odb::statement::process_update(char const*, void const* const*, unsigned long, unsigned long, char, std::__cxx11::basic_string, std::allocator >&)' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodb-mysql.so: undefined reference to `odb::statement::process_select(char const*, void const* const*, unsigned long, unsigned long, char, char, bool, std::__cxx11::basic_string, std::allocator >&, bool)' collect2: error: ld returned 1 exit status tried a locally compiled version of odb-mysql.so too but that didn't help same error appreciate any help. Thank you in advance, Amir From boris at codesynthesis.com Tue Jan 17 09:12:37 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Tue Jan 17 09:12:46 2017 Subject: [odb-users] linkage problems using mysql database In-Reply-To: References: Message-ID: Hi Amir, Amir Developer writes: > I'm trying to compile and link the hello sample but with no luck. > Env: Ubuntu 16.04.1 LTS > Compiler: g++ 5.4.0 > odb: installed through APT version 2.4.0 > database: MySQL This is a known Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/libodb/+bug/1588330 > tried a locally compiled version of odb-mysql.so too but that didn't help > same error You need to compile both libodb and libodb-mysql with the same compiler. Just compiling libodb-mysql and using libodb from APT won't work. Boris From amir.thedev at gmail.com Tue Jan 17 10:18:22 2017 From: amir.thedev at gmail.com (Amir Developer) Date: Tue Jan 17 11:51:55 2017 Subject: [odb-users] linkage problems using mysql database In-Reply-To: References: Message-ID: Compiled everything from source and all works fine thank you very much, Amir On Tue, Jan 17, 2017 at 4:12 PM, Boris Kolpackov wrote: > Hi Amir, > > Amir Developer writes: > > > I'm trying to compile and link the hello sample but with no luck. > > Env: Ubuntu 16.04.1 LTS > > Compiler: g++ 5.4.0 > > odb: installed through APT version 2.4.0 > > database: MySQL > > This is a known Ubuntu bug: > > https://bugs.launchpad.net/ubuntu/+source/libodb/+bug/1588330 > > > > tried a locally compiled version of odb-mysql.so too but that didn't help > > same error > > You need to compile both libodb and libodb-mysql with the same compiler. > Just compiling libodb-mysql and using libodb from APT won't work. > > Boris > From alejandro_pnz at icloud.com Wed Jan 18 02:15:59 2017 From: alejandro_pnz at icloud.com (Alexander Igorevich) Date: Wed Jan 18 02:16:14 2017 Subject: [odb-users] SQLite data migration null pointer Message-ID: <94BFC252-17B6-4A6C-BEFD-5E8CD8C3468B@icloud.com> Hi all. I have a next problem: during making schema migration from one version to other, in file schema-catalog.cxx: on line 181 crashes with null ptr. In that migration (2nd) I?ve add two new classes, that inherit from base class from 1st version. Base class has pragma: #pragma db model version(1, 1, closed) Child classes pragma?s: #pragma db model version(2, 2, open) Please help with this crash. P.S.: debug screenshot https://dl.dropboxusercontent.com/u/55781401/migration.png From haoxiaokun_81 at foxmail.com Tue Jan 17 21:22:51 2017 From: haoxiaokun_81 at foxmail.com (=?gb18030?B?us3J0A==?=) Date: Wed Jan 18 05:59:03 2017 Subject: [odb-users] odb problem Message-ID: hi ! I have a problem with odb , "error C2440: ??: ????const st_mysql_time?????boost::posix_time::ptime?" why? From boris at codesynthesis.com Wed Jan 18 06:03:04 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Jan 18 06:03:13 2017 Subject: [odb-users] SQLite data migration null pointer In-Reply-To: <94BFC252-17B6-4A6C-BEFD-5E8CD8C3468B@icloud.com> References: <94BFC252-17B6-4A6C-BEFD-5E8CD8C3468B@icloud.com> Message-ID: Hi Alexander, Alexander Igorevich writes: > #pragma db model version(2, 2, open) As I have already explained in our previous conversation, this does not make sense. You are saying that you can only migrate from version 2 and your latest version is also 2. So no migration code should run for this build of our application, by definition. Please read the manual on the semantics of the version pragma. Boris From mike.ruffing at ipconfigure.com Wed Jan 25 16:58:20 2017 From: mike.ruffing at ipconfigure.com (Mike Ruffing) Date: Thu Jan 26 07:06:12 2017 Subject: [odb-users] SQLite Concurrency Message-ID: Boris, Operation System: Ubuntu 16.04 ODB: 2.4.0 SQLite: 3.12.2 Is it possible to query (select statement) a SQLite database using multiple threads (unique connection per thread via connection_pool_factory), without one blocking the other? Modifying the "hello" odb example, I created one long running query (> 3 seconds) and four short running queries (< 1 second). I hosted each "db->query" in its own thread, executing the long running query first. I can see all the threads begin execution but the four short running queries block at the begin transaction, waiting for the long query transaction to complete. Thanks, Mike Ruffing From simon at 2ndquadrant.com Thu Jan 26 07:25:08 2017 From: simon at 2ndquadrant.com (Simon Riggs) Date: Thu Jan 26 07:25:20 2017 Subject: [odb-users] SQLite Concurrency In-Reply-To: References: Message-ID: On 25 January 2017 at 21:58, Mike Ruffing wrote: > Is it possible to query (select statement) a SQLite database using multiple > threads (unique connection per thread via connection_pool_factory), without > one blocking the other? That's called "Postgres". -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services From boris at codesynthesis.com Thu Jan 26 10:09:53 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Jan 26 10:10:02 2017 Subject: [odb-users] SQLite Concurrency In-Reply-To: References: Message-ID: Hi Mike, Mike Ruffing writes: > Is it possible to query (select statement) a SQLite database using multiple > threads (unique connection per thread via connection_pool_factory), without > one blocking the other? SQLite 3 has a pretty poor concurrency support with a fairly convoluted (and often surprising) locking architecture. To start with, there are two levels of locking (at least in the way ODB uses SQLite): To support multiple connections in multi-threaded applications ODB uses SQLite's shared cache[1] with the unlock notification functionality[2]. This forms the first level of locking (let's call it the "cache level"): the database pages are shared by all the threads and access is serialized via a mutex (note: not an RW mutex)[3]. In practical terms, this means that every step of executing a query (i.e., every sqlite3_step() call) starts by acquiring this mutex and ends by releasing it. Which, in turn, means that while multiple threads can execute a SELECT statement at the same time, at best (see the second level of locking) it will be inter- leaving, not parallel (e.g., the first thread get a row, then the second gets a row, then the first one again, and so on). Then there is the second level of locking which is on the database and its tables (let's call it the "database level"). In a nutshell (see this post[4] for details), there can only be one transaction that is writing to the database but several that are reading. > Modifying the "hello" odb example, I created one long running query (> 3 > seconds) and four short running queries (< 1 second). I hosted each > "db->query" in its own thread, executing the long running query first. I > can see all the threads begin execution but the four short running queries > block at the begin transaction, waiting for the long query transaction to > complete. If all four transactions are read-only then none of them should block in BEGIN (provided you are not using IMMEDIATE/EXCLUSIVE). Can you add a delay (sleep) and a print statement on each iteration over the query in all four transactions? You should then see overlapping execution of the queries. [1] http://www.sqlite.org/sharedcache.html [2] https://www.sqlite.org/unlock_notify.html [3] https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg72045.html [4] https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg59903.html Boris From boris at codesynthesis.com Thu Jan 26 10:16:10 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Jan 26 10:16:20 2017 Subject: [odb-users] SQLite Concurrency In-Reply-To: References: Message-ID: Hi Simon, Simon Riggs writes: > That's called "Postgres". While I think PostgreSQL is great, in most cases you can't just replace (an embedded) database like SQLite with (a client-server) like Postgres. For example, we use SQLite in bpkg[1], a C++ package manager we are developing. Suggesting that users of bpkg install and administer the PostgreSQL server would be absurd. [1] https://build2.org Boris From simon at 2ndquadrant.com Thu Jan 26 10:38:16 2017 From: simon at 2ndquadrant.com (Simon Riggs) Date: Fri Jan 27 08:30:52 2017 Subject: [odb-users] SQLite Concurrency In-Reply-To: References: Message-ID: On 26 January 2017 at 15:16, Boris Kolpackov wrote: > Hi Simon, > > Simon Riggs writes: > >> That's called "Postgres". > > While I think PostgreSQL is great, in most cases you can't just > replace (an embedded) database like SQLite with (a client-server) > like Postgres. Agreed its not a drop in replacement. > For example, we use SQLite in bpkg[1], a C++ package manager we are > developing. Suggesting that users of bpkg install and administer the > PostgreSQL server would be absurd. > > [1] https://build2.org I guess for me "embedded" => single-session. SQLite was developed from Postgres as a specialization for certain use cases. If you need multi-session then using Postgres is the right choice, even if that is single user. Postgres is regularly used in unattended installs and has been for many years. It's a common requirement to do multiple things at once as well as have active replication and concurrent maintenance via vacuuming, for example. Apologies for popping in like this, been reading list for some time now. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services From mike.ruffing at ipconfigure.com Fri Jan 27 12:14:27 2017 From: mike.ruffing at ipconfigure.com (Mike Ruffing) Date: Fri Jan 27 13:23:22 2017 Subject: [odb-users] SQLite Concurrency In-Reply-To: References: Message-ID: Boris, Thank you for the detailed response. I think I have a better understanding of what's going on. After further testing I can confirm that the blocking statement was NOT the begin transaction, but rather at the the result iteration, which confirms your reference to "cache-level" locking via a mutex. Also, since my long running query only returned a single row, there was no interleaving with the short running queries. In a separate test I turned off shared cache via SQLITE_OPEN_PRIVATECACHE. With caching turned off, all the short running queries executed and finished in parallel to the long running query. For our use case (favor concurrency over memory footprint), I think disabling shared cache is the right approach. Are there any known problems/gotchas with disabling shared cache? Thanks, Mike Ruffing On Thu, Jan 26, 2017 at 10:10 AM Boris Kolpackov wrote: > Hi Mike, > > Mike Ruffing writes: > > > Is it possible to query (select statement) a SQLite database using > multiple > > threads (unique connection per thread via connection_pool_factory), > without > > one blocking the other? > > SQLite 3 has a pretty poor concurrency support with a fairly convoluted > (and often surprising) locking architecture. To start with, there are > two levels of locking (at least in the way ODB uses SQLite): > > To support multiple connections in multi-threaded applications ODB uses > SQLite's shared cache[1] with the unlock notification functionality[2]. > This forms the first level of locking (let's call it the "cache level"): > the database pages are shared by all the threads and access is serialized > via a mutex (note: not an RW mutex)[3]. In practical terms, this means > that every step of executing a query (i.e., every sqlite3_step() call) > starts by acquiring this mutex and ends by releasing it. Which, in turn, > means that while multiple threads can execute a SELECT statement at the > same time, at best (see the second level of locking) it will be inter- > leaving, not parallel (e.g., the first thread get a row, then the second > gets a row, then the first one again, and so on). > > Then there is the second level of locking which is on the database and > its tables (let's call it the "database level"). In a nutshell (see this > post[4] for details), there can only be one transaction that is writing > to the database but several that are reading. > > > > Modifying the "hello" odb example, I created one long running query (> 3 > > seconds) and four short running queries (< 1 second). I hosted each > > "db->query" in its own thread, executing the long running query first. I > > can see all the threads begin execution but the four short running > queries > > block at the begin transaction, waiting for the long query transaction to > > complete. > > If all four transactions are read-only then none of them should block > in BEGIN (provided you are not using IMMEDIATE/EXCLUSIVE). Can you add > a delay (sleep) and a print statement on each iteration over the query > in all four transactions? You should then see overlapping execution of > the queries. > > [1] http://www.sqlite.org/sharedcache.html > [2] https://www.sqlite.org/unlock_notify.html > [3] > https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg72045.html > [4] > https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg59903.html > > Boris > From boris at codesynthesis.com Mon Jan 30 08:35:04 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Jan 30 08:35:13 2017 Subject: [odb-users] SQLite Concurrency In-Reply-To: References: Message-ID: Hi Mike, Mike Ruffing writes: > In a separate test I turned off shared cache via SQLITE_OPEN_PRIVATECACHE. > With caching turned off, all the short running queries executed and > finished in parallel to the long running query. > > For our use case (favor concurrency over memory footprint), I think > disabling shared cache is the right approach. Are there any known > problems/gotchas with disabling shared cache? Yes, this will only work for read-only connections. As soon as you have a read and write connections trying to do work at the same time, SQLite will return an error (which ODB will throw; though there is a way to specify a timeout at the SQLite level[1] during which it will retry the operation before giving up). One can probably come up with a custom ODB connection pool that implements a single writer connection/multiple reader connections using an RW mutex, though this will be a pretty narrowly applicable solution. [1] https://www.sqlite.org/c3ref/busy_timeout.html Boris