From jiang.j.q at tizer.com.cn Sat Mar 2 06:46:02 2024 From: jiang.j.q at tizer.com.cn (=?UTF-8?B?6JKL6YeR5p2D?=) Date: Mon Mar 4 08:13:56 2024 Subject: [odb-users] odb compiler can't run on windows 10 X64 Message-ID: <8aa22aa9-2d1e-429c-8bbf-5e1f9b508539.jiang.j.q@tizer.com.cn> Hi, I try to run odb compiler on windows 10 X64 to create files,but no response any more. would you send me another version or help me solving this issue,thanks. __ ________________________________________________ From tlytle123 at gmail.com Tue Mar 12 18:01:31 2024 From: tlytle123 at gmail.com (Tyler Lytle) Date: Wed Mar 13 08:24:42 2024 Subject: [odb-users] Help Building ODB on RHEL 8.8 Message-ID: Hello ODB! I am having trouble compiling ODB on my RHEL 8.8 machine. I compiled and used ODB 2.5.0-b.21 on my RHEL 8.5 machine just fine for a while. My shop recently upgraded to RHEL 8.8 and I re-ran the commands to download the latest-and-greatest ODB packages and now I cannot get it to build ODB 2.5.0-b.25. The command that is causing the issue is follows: # bpkg build libodb-mysql ?sys:libmysqlclient ?sys:libcrypto ?sys:libz ?sys:libssl || exit 1 The error that this produces (using the -V option) is as follows: 1041 package(s) in 3 repository(s) info: dir{libodb-2.5.0-b.25/} is up to date updated libodb/2.5.0-b.25 mkdir ./.bpkg/tmp/ LC_ALL=C dnf list --all --cacheonly --quiet community-mysql-devel rpm error: no installed system package for libmysqlclient info: specify --sys-install to try to install it info: specify libmysqlclient/* if package is not installed with system package manager info: specify --sys-no-query to disable system package manager interactions rmdir -r ./.bpkg/tmp/ I have dug around in the sqlite3 database and noticed that it is looking for an RPM called "community-mysql-devel" for a Fedora system. I understand that Fedora and RedHat are similar, but they are not the same. There is no "community-mysql-devel" RPM available for RedHat. There is only "mysql-devel". I can get this to compile if I get inside that sqlite database and remove a lot of this configuration. However, I suspect that is not a very good idea. Is there a way to specify configurations to tell build2 to look for "mysql-devel" instead of "community-mysql-devel"? Thank you for your help. -- Tyler Lytle E-Mail: tlytle123@gmail.com From boris at codesynthesis.com Wed Mar 13 08:41:37 2024 From: boris at codesynthesis.com (Boris Kolpackov) Date: Wed Mar 13 08:31:59 2024 Subject: [odb-users] Help Building ODB on RHEL 8.8 In-Reply-To: References: Message-ID: Tyler Lytle writes: > # bpkg build libodb-mysql ?sys:libmysqlclient ?sys:libcrypto ?sys:libz > ?sys:libssl || exit 1 > > The error that this produces (using the -V option) is as follows: > > 1041 package(s) in 3 repository(s) > info: dir{libodb-2.5.0-b.25/} is up to date > updated libodb/2.5.0-b.25 > mkdir ./.bpkg/tmp/ > LC_ALL=C dnf list --all --cacheonly --quiet community-mysql-devel rpm > error: no installed system package for libmysqlclient > info: specify --sys-install to try to install it > info: specify libmysqlclient/* if package is not installed with system > package manager > info: specify --sys-no-query to disable system package manager > interactions > rmdir -r ./.bpkg/tmp/ > > I have dug around in the sqlite3 database and noticed that it is looking > for an RPM called "community-mysql-devel" for a Fedora system. I understand > that Fedora and RedHat are similar, but they are not the same. There is no > "community-mysql-devel" RPM available for RedHat. There is only > "mysql-devel". Ah, thanks for pointing this out, we will update the mapping for RHEL. > Is there a way to specify configurations to tell build2 to look for > "mysql-devel" instead of "community-mysql-devel"? There isn't but you can sidestep the issue by installing the mysql-devel package yourself and then using ?sys:libmysqlclient/* instead, which essentially tell bpkg to assume the system package is already installed and its version should match any constraint (this, BTW, was one of the suggestions in the diagnostics above). From tlytle123 at gmail.com Wed Mar 13 15:43:17 2024 From: tlytle123 at gmail.com (Tyler Lytle) Date: Thu Mar 14 04:19:10 2024 Subject: [odb-users] Help Building ODB on RHEL 8.8 In-Reply-To: References: Message-ID: Ah. I feel stupid now that I did not realize what that was saying. Yeah, it looks like it builds now. Thank you for the help! On Wed, Mar 13, 2024 at 7:41?AM Boris Kolpackov wrote: > Tyler Lytle writes: > > > # bpkg build libodb-mysql ?sys:libmysqlclient ?sys:libcrypto ?sys:libz > > ?sys:libssl || exit 1 > > > > The error that this produces (using the -V option) is as follows: > > > > 1041 package(s) in 3 repository(s) > > info: dir{libodb-2.5.0-b.25/} is up to date > > updated libodb/2.5.0-b.25 > > mkdir ./.bpkg/tmp/ > > LC_ALL=C dnf list --all --cacheonly --quiet community-mysql-devel rpm > > error: no installed system package for libmysqlclient > > info: specify --sys-install to try to install it > > info: specify libmysqlclient/* if package is not installed with system > > package manager > > info: specify --sys-no-query to disable system package manager > > interactions > > rmdir -r ./.bpkg/tmp/ > > > > I have dug around in the sqlite3 database and noticed that it is looking > > for an RPM called "community-mysql-devel" for a Fedora system. I > understand > > that Fedora and RedHat are similar, but they are not the same. There is > no > > "community-mysql-devel" RPM available for RedHat. There is only > > "mysql-devel". > > Ah, thanks for pointing this out, we will update the mapping for RHEL. > > > > Is there a way to specify configurations to tell build2 to look for > > "mysql-devel" instead of "community-mysql-devel"? > > There isn't but you can sidestep the issue by installing the mysql-devel > package yourself and then using ?sys:libmysqlclient/* instead, which > essentially tell bpkg to assume the system package is already installed > and its version should match any constraint (this, BTW, was one of the > suggestions in the diagnostics above). > -- Tyler Lytle E-Mail: tlytle123@gmail.com From boris at codesynthesis.com Thu Mar 14 09:23:29 2024 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Mar 14 09:13:51 2024 Subject: [odb-users] Help Building ODB on RHEL 8.8 In-Reply-To: References: Message-ID: > On Wed, Mar 13, 2024 at 7:41?AM Boris Kolpackov > wrote: > > Ah, thanks for pointing this out, we will update the mapping for RHEL. FYI, that mapping has been fixed[1] (and also for CentOS) and the revision published, if you would like to give it a try (will need to run `bpkg fetch` to get the new revision). [1] https://git.build2.org/cgit/packaging/mysql/mysql/commit/?id=7e3c47f72d4f3a3477184d84cc6bf76a2d95924c From tlytle123 at gmail.com Thu Mar 14 14:49:54 2024 From: tlytle123 at gmail.com (Tyler Lytle) Date: Fri Mar 15 02:38:04 2024 Subject: [odb-users] Help Building ODB on RHEL 8.8 In-Reply-To: References: Message-ID: Yep. It builds now using ?sys:libmysqlclient (no /* at the end). On Thu, Mar 14, 2024 at 8:23?AM Boris Kolpackov wrote: > > On Wed, Mar 13, 2024 at 7:41?AM Boris Kolpackov > > > wrote: > > > > Ah, thanks for pointing this out, we will update the mapping for RHEL. > > FYI, that mapping has been fixed[1] (and also for CentOS) and the revision > published, if you would like to give it a try (will need to run `bpkg > fetch` > to get the new revision). > > [1] > https://git.build2.org/cgit/packaging/mysql/mysql/commit/?id=7e3c47f72d4f3a3477184d84cc6bf76a2d95924c > -- Tyler Lytle E-Mail: tlytle123@gmail.com From alaiseca at gmail.com Thu Mar 28 19:25:59 2024 From: alaiseca at gmail.com (Aldo Laiseca) Date: Fri Mar 29 01:36:04 2024 Subject: [odb-users] How to perform an aggregate subquery Message-ID: <4F874EAC-04FE-472E-9E16-23AC177F10CB@gmail.com> Hi, I have a table, say T1, containing a field which is a foreign key to another table, say T2, and a timestamp field. As C++ classes, I have something like the following: #pragma db object session pointer(std::shared_ptr< ClassForTableT1 >) table(?T1") class ClassForTableT1 { private: #pragma db id auto column("id") not_null unsigned long id; ?. #pragma db column("id_t2") not_null std::shared_ptr objT2; #pragma db column(?timestamp_action") not_null #pragma db type("TIMESTAMP") boost::posix_time::ptime timestampAction; ... } #pragma db object session pointer(std::shared_ptr< ClassForTableT2 >) table(?T2") class ClassForTableT2 { private: #pragma db id auto column("id") not_null unsigned long id; ?. #pragma db column(?name") not_null std::string name; ... } I need to find the most recent T1 (based on field timestamp_action) having a foreign key to T2 matching a particular value of T2.name. In SQL, something like this: select t1.* from t1 where t1.timestamp_action = (select max(t1.timestamp_action) from t1 join t2 on t1.id_t2 = t2.id where t2.name = ?)) How could I write such a query using ODB? As usual, any help will be greatly appreciated.