From becoggins at hotmail.com Fri Jan 20 20:17:03 2023 From: becoggins at hotmail.com (Brian E. Coggins) Date: Fri Jan 20 20:10:23 2023 Subject: [odb-users] SQLite3 Version (and Native View Question) Message-ID: Hello Boris and friends, By chance I discovered that the newest versions of SQLite finally support full outer joins, but the version incorporated into libodb-sqlite 2.5.0-b.21 (which I think is still current, if I?m interpreting bpkg?s output correctly?my apologies if I?m misreading it) still does not. This leads to three questions: 1. Can we expect a newer version of sqlite3 to be incorporated into ODB?s distribution soon? (Or I am dumb and missing an already-existing update, perhaps by using bpkg incorrectly?) 2. I thought about switching to the system's libsqlite3, except that seems to be a mess. Current versions of macOS distribute a /usr/bin/sqlite3 that supports full outer joins, but the libsqlite3 in /usr/local/lib is a different and older version. I?m guessing /usr/local/lib/libsqlite3 doesn?t come with the system?which got me wondering, does the ODB build2 process in fact generate this libsqlite3? The dates seem to match. If so, is that also waiting for an update in the ODB codebase? Otherwise I am at a loss for what is generating libsqlite3, and how best to update it. 3. Absent a sqlite3 upgrade, I thought I?d try to workaround the lack of outer join support by using a complex query of the structure WITH (xxx UNION yyy) SELECT zzz as part of my ODB native view. The query works in the sqlite3 CLI, but the ODB compiler complains ?view XXX has an incomplete query template and no associated objects.? Is the ODB compiler trying to parse the query and getting hung up on this syntax? Any advice? Thanks, Brian From boris at codesynthesis.com Wed Jan 25 07:07:11 2023 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Jan 25 07:00:12 2023 Subject: [odb-users] SQLite3 Version (and Native View Question) In-Reply-To: References: Message-ID: Brian E. Coggins writes: > 1. Can we expect a newer version of sqlite3 to be incorporated into > ODB?s distribution soon? (Or I am dumb and missing an already-existing > update, perhaps by using bpkg incorrectly?) SQLite is not really a part of the ODB distribution but rather a package that libodb-sqlite depends on. We've published 3.39.4 that includes the functionality you are looking for: https://cppget.org/libsqlite3 > 2. I thought about switching to the system's libsqlite3, except that > seems to be a mess. [...] Yeah, I am not sure what's going on there. I would suggest that you try to upgrade to 3.39.4 from the above package and see if that fixes things. > 3. Absent a sqlite3 upgrade, I thought I?d try to workaround the > lack of outer join support by using a complex query of the > structure WITH (xxx UNION yyy) SELECT zzz as part of my ODB > native view. The query works in the sqlite3 CLI, but the ODB > compiler complains ?view XXX has an incomplete query template > and no associated objects.? Is the ODB compiler trying to parse > the query and getting hung up on this syntax? Any advice? Yes, it tries to guess whether it's a complete query or the WHERE clause by checking if the query starts with one of the known keywords (like SELECT). I have a TODO item to recognize some additional database- specific keywords (like WITH). From andrew.herridge at btinternet.com Wed Jan 25 16:02:36 2023 From: andrew.herridge at btinternet.com (andrew.herridge@btinternet.com) Date: Thu Jan 26 09:11:24 2023 Subject: [odb-users] Issue building the sqlite library as part of sqlite specific library build for odb. Message-ID: <003f01d93100$5aa69d50$0ff3d7f0$@btinternet.com> Hi, Probably doing something stupid but I am struggling with building the sqlite library using the instructions in README file beginning 'This directory contains project/solution files for building SQLite libraries with Microsoft Visual Studio versions 8, 9, 10, 11, and 12.' This is an integral part of building the db specific library for sqlite so I am a bit stuck. I have retrieved the 'sqlite3.c', 'sqlite3.h' and sqlite3.def files and copied them alongside the solution as instructed. When I then try to build the library using the solution contained in '/etc/sqlite' using VS 2022, I get 54 errors (LNK2001 unresolved external). I am using VS 2022 (VS17) as previously mentioned, so I am unsure if this is the issue, but if it is standard c/c++ I would have thought it would build. As I say I am probably missing something stupid so any pointers would be appreciated. Thanks Andy Herridge From boris at codesynthesis.com Thu Jan 26 09:24:25 2023 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Jan 26 09:17:25 2023 Subject: [odb-users] Issue building the sqlite library as part of sqlite specific library build for odb. In-Reply-To: <003f01d93100$5aa69d50$0ff3d7f0$@btinternet.com> References: <003f01d93100$5aa69d50$0ff3d7f0$@btinternet.com> Message-ID: andrew.herridge@btinternet.com writes: > 'This directory contains project/solution files for building SQLite > libraries with Microsoft Visual Studio versions 8, 9, 10, 11, and 12.' > This is an integral part of building the db specific library for sqlite > so I am a bit stuck. We've since dropped this approach of maintaining project/solution files for building SQLite (upstream wasn't interested and it's too brittle for us to support). The new recommended approach is to build everything from packages as described on this page: https://codesynthesis.com/products/odb/doc/install-build2.xhtml Let me know if you have any issues with any of the steps. From becoggins at hotmail.com Thu Jan 26 18:51:29 2023 From: becoggins at hotmail.com (Brian E. Coggins) Date: Thu Jan 26 18:44:49 2023 Subject: [odb-users] SQLite3 Version (and Native View Question) In-Reply-To: References: Message-ID: > On 25 Jan 2023, at 07:07, Boris Kolpackov wrote: > > SQLite is not really a part of the ODB distribution but rather a > package that libodb-sqlite depends on. We've published 3.39.4 that > includes the functionality you are looking for: > > https://cppget.org/libsqlite3 > Thanks for putting out an updated libsqlite3 package! This solved the problem. Brian