[SOCI-users] How to check if SQL delete from deleted anything?

2012-05-02 Thread Vadim Zeitlin
Hello, I'm just starting to use SOCI so sorry in advance if I'm missing something obvious but is there any way to detect if a delete SQL statement affected any rows? I thought that got_data() would return false if it didn't delete anything but at least with the ODBC backend this is not the case

Re: [SOCI-users] How to check if SQL delete from deleted anything?

2012-05-03 Thread Vadim Zeitlin
On Thu, 3 May 2012 12:08:29 +0100 Neil Morgenstern neil.morgenstern.2...@gmail.com wrote: NM We had to modify the odbc error in our code to make it more descriptive, NM i.e. actually give the error message in the what() text. Hello Neil, This looks like a good idea in its own right but I'm

[SOCI-users] PATCH: Fix buffer overflow in ODBC backend pre_use()

2012-05-07 Thread Vadim Zeitlin
Hello again, Currently the code in odbc_standard_use_type_backend::pre_use() can overflow the buffer for x_stdstring type variables as it's allocated to the size of the string in prepare_for_bind() but the string value can change afterwards, e.g. if you do this: std::string str;

Re: [SOCI-users] How to check if SQL delete from deleted anything?

2012-05-07 Thread Vadim Zeitlin
On Thu, 3 May 2012 23:43:18 +0100 Neil Morgenstern neil.morgenstern.2...@gmail.com wrote: NM Ok, my SQL isn't that expert but to find out how many were deleted you NM might: NM - SELECT @@ROWCOUNT as NumDeleted together with your delete statement which NM would give you the number of rows

Re: [SOCI-users] How to cache prepared statements?

2012-05-08 Thread Vadim Zeitlin
On Mon, 7 May 2012 20:27:58 +0100 Neil Morgenstern neil.morgenstern.2...@gmail.com wrote: NM They wouldn't be static variables they would be class member variables, so NM in your case members of MyClass. It's true but in my case MyClass is a singleton so there is no essential difference

Re: [SOCI-users] How to cache prepared statements?

2012-05-09 Thread Vadim Zeitlin
On Wed, 9 May 2012 11:40:20 +0100 Neil Morgenstern neil.morgenstern.2...@gmail.com wrote: NM This is becoming a discussion though in good programming design and not NM SOCI itself. Yes, but I'd actually prefer to avoid discussing the general design and keep the discussion centered on just the

[SOCI-users] ODBC backend broken for custom types

2012-05-20 Thread Vadim Zeitlin
Hello, Sorry about many messages but I keep running into problems with SOCI, at least when using ODBC backend (I really hope it's exceptional this way, I hoped to make my life simpler by using only it for the initial development and testing but perhaps this wasn't such a good idea...). The

[SOCI-users] Firebird fixes

2012-05-23 Thread Vadim Zeitlin
: Implement get_affected_rows() for SOCI Firebird backend. (2012-05-23 20:33:14 +0200) Vadim Zeitlin (5): SOCI Firebird backend compilation fix: don't use x_cstring. Fix x_integer handling in SOCI Firebird backend

Re: [SOCI-users] PATCH: Fix buffer overflow in ODBC backend pre_use()

2012-05-24 Thread Vadim Zeitlin
On Fri, 4 May 2012 01:55:44 +0200 I wrote: VZ Please let me know if you see any problems with this patch and if it can VZ be applied to the official version otherwise (or if you prefer to receive VZ patch submissions in some other way, e.g. via git pull requests). VZ VZ Thanks, VZ VZ VZ VZ

Re: [SOCI-users] PATCH: Fix buffer overflow in ODBC backend pre_use()

2012-05-24 Thread Vadim Zeitlin
On Thu, 24 May 2012 22:31:29 +0100 Neil Morgenstern neil.morgenstern.2...@gmail.com wrote: NM Let's fix this properly. Get rid of these raw pointers and use NM vectorchar. Ensure it is bound properly too. I don't think the code is really going to be simpler with vectorchar. And there is no

[SOCI-users] SOCI development (was: PATCH: Fix buffer overflow in ODBC backend pre_use())

2012-05-25 Thread Vadim Zeitlin
On Fri, 25 May 2012 11:28:49 +0100 Mateusz Loskot mate...@loskot.net wrote: ML SOCI doesn't use shared_ptr because it doesn't force you to be using it. ML There are some features of boost you can optionally use. shared_ptr is ML standard in C++11 but we are not C++11 compliant yet. ML ML

[SOCI-users] RFD: Adding functions for working with auto-incremented values

2012-05-25 Thread Vadim Zeitlin
Hello, It is common to use auto-generated values for primary keys of the tables that don't have any natural candidate. There are 2 mechanisms for doing this depending on the database: 1. Use a sequence. In this case you need to get the next value from the sequence and use it in INSERT INTO

[SOCI-users] [PATCH] Add support for 64 bit types to ODBC backend.

2012-05-25 Thread Vadim Zeitlin
Hello again, Here is another relatively trivial patch to the ODBC backend adding support for 64 bit types: Support x_long_long and x_unsigned_long_long input and output parameters. Signed-off-by: Vadim Zeitlin vz-s

[SOCI-users] Yet another ODBC driver problem: SQL type for string fields?

2012-05-27 Thread Vadim Zeitlin
Hello, I ran into another problem with the ODBC driver when used with MS SQL server (the problem doesn't arise when using ODBC with Oracle, PostgreSQL or Firebird): consider a very simple table defined using this MS SQL code: CREATE TABLE country ( currency CHAR(3)

[SOCI-users] ODBC backend post_use()

2012-05-27 Thread Vadim Zeitlin
This is getting somewhat ridiculous but it looks that wherever I look at ODBC backend code I find a problem. The latest one is in its odbc_standard_use_type_backend::post_use(): what is the point of overwriting the *input* parameters with the values we have provided for ODBC driver ourselves?

Re: [SOCI-users] ODBC backend post_use()

2012-05-28 Thread Vadim Zeitlin
On Mon, 28 May 2012 11:37:32 +0100 Mateusz Loskot mate...@loskot.net wrote: ML On 28 May 2012 02:48, Pawel Aleksander Fedorynski pfe...@gmail.com wrote: ML [+soci-devel] ML ML Guys: do you think we could just give Vadim write access to git so he ML can submit his fixes for the ODBC backend?  

[SOCI-users] Is soci-devel in use or not? (was: ODBC backend post_use())

2012-05-28 Thread Vadim Zeitlin
On Sun, 27 May 2012 18:48:05 -0700 Pawel Aleksander Fedorynski pfe...@gmail.com wrote: PAF [+soci-devel] Hi, Just a question: I tried subscribing to soci-devel but my subscription request was rejected. So is this list not used at all any more? Thanks, VZ pgpJm70F6ErK2.pgp Description:

Re: [SOCI-users] RFD: Adding functions for working with auto-incremented values

2012-05-28 Thread Vadim Zeitlin
On Mon, 28 May 2012 10:29:06 -0700 Pawel Aleksander Fedorynski pfe...@gmail.com wrote: PAF  I also wonder where should the new methods be documented. The easy way is PAF to just do it in the reference section, but nobody is probably going to PAF find them there. But I don't see where else to

[SOCI-users] Why does standard_use_type::post_use() need to convert anything?

2012-06-03 Thread Vadim Zeitlin
Hello, I've found another puzzle in the SOCI code: when you run an insert statement with some use() parameters of some custom type for which type_conversion is specialized, the values are correct converted to the values of the base type, i.e. the type actually used at database level, in

[SOCI-users] Why do we need x_unsigned_long?

2012-06-15 Thread Vadim Zeitlin
Hello, The handling of long values has been recently changed to map to either x_integer or x_long_long SOCI internal type depending on sizeof(long) in the program. But unsigned long remains mapped to its own special x_unsigned_long type which is always mapped to 64 bit long long (SQL_BIGINT) in

[SOCI-users] Is it correct to silently ignore truncations?

2012-06-15 Thread Vadim Zeitlin
Hello again, Currently if a select statement results in a null value and no indicator is defined for the corresponding output parameter, a Null value fetched and no indicator defined. exception is thrown. I like this very much as it doesn't allow you to simply ignore nulls while still letting

Re: [SOCI-users] Why do we need x_unsigned_long?

2012-06-19 Thread Vadim Zeitlin
On Mon, 18 Jun 2012 20:09:43 +0100 Neil Morgenstern neil.morgenstern.2...@gmail.com wrote: NM I don't think you can just rip it out of the code because people may well NM be using code relying on it being there. It is defined in a private soci-backend.h header, is it really a serious concern

Re: [SOCI-users] Why does standard_use_type::post_use() need to convert anything?

2012-06-20 Thread Vadim Zeitlin
On Tue, 19 Jun 2012 22:44:10 -0700 Stephen Hutton shut...@featurecomplete.com wrote: SH Can use() parameters actually be modified? I hope not but I've been SH surprised by SOCI before... SH SH If recall correctly, this is for binding to stored procedure out SH parameters. But shouldn't

Re: [SOCI-users] Why does standard_use_type::post_use() need to convert anything?

2012-06-25 Thread Vadim Zeitlin
On Sun, 24 Jun 2012 23:59:58 -0700 Stephen Hutton shut...@featurecomplete.com wrote: SH On Wed, Jun 20, 2012 at 3:45 AM, Vadim Zeitlin vz-s...@zeitlins.org wrote: SH SH On Tue, 19 Jun 2012 22:44:10 -0700 Stephen Hutton SH shut...@featurecomplete.com wrote: SH SH SH Can use() parameters

Re: [SOCI-users] Why does standard_use_type::post_use() need to convert anything?

2012-06-25 Thread Vadim Zeitlin
On Mon, 25 Jun 2012 15:13:01 +0100 Neil Morgenstern neil.morgenstern.2...@gmail.com wrote: NM Definitely not, out parameters are part of the parameter set, not part of NM the result set. Sorry, definitely not what? NM When we implemented using SOCI for ODBC for stored procedures (which was NM

Re: [SOCI-users] Why does standard_use_type::post_use() need to convert anything?

2012-06-26 Thread Vadim Zeitlin
On Tue, 26 Jun 2012 11:10:14 +0100 Neil Morgenstern neil.morgenstern.2...@gmail.com wrote: NM On Mon, Jun 25, 2012 at 3:29 PM, Vadim Zeitlin vz-s...@zeitlins.org wrote: NM NM NM Definitely not, out parameters are part of the parameter set, not part NM of NM NM the result set. NM NM Sorry

Re: [SOCI-users] Review request for pending changes

2012-07-08 Thread Vadim Zeitlin
On Sun, 8 Jul 2012 13:31:46 -0700 Pawel Aleksander Fedorynski pfe...@gmail.com wrote: PAF --- a/src/backends/mysql/statement.cpp PAF +++ b/src/backends/mysql/statement.cpp PAF @@ -377,10 +377,8 @@ void mysql_statement_backend::describe_column(int colNum, PAF case FIELD_TYPE_CHAR:

[SOCI-users] Add CMake support for Firebird

2012-07-08 Thread Vadim Zeitlin
Hello, Would anybody be interested in adding support for building Firebird to cmake build system? I had a look at it and probably isn't that complicated but I hardly know cmake at all and, frankly, am not very interested in learning it so it still risks to be beyond my abilities. The only

Re: [SOCI-users] Review request for pending changes

2012-07-11 Thread Vadim Zeitlin
On Tue, 10 Jul 2012 22:48:34 -0700 Pawel Aleksander Fedorynski pfe...@gmail.com wrote: PAF I'm curious, why did you decide not to use the code I suggested for PAF backends/mysql/statement.cpp? I'm sorry, I simply misread the changes in your message. I meant to do exactly what you suggested but

Re: [SOCI-users] SOCI project manager

2012-07-20 Thread Vadim Zeitlin
On Fri, 20 Jul 2012 09:48:45 +0100 Mateusz Loskot mate...@loskot.net wrote: ML On 19 July 2012 21:12, Maciej Sobczak p...@msobczak.com wrote: ML ML I'm pleased to announce that our project member, Mateusz Łoskot, who has ML served as a long-time contributor and build manager, has accepted to

Re: [SOCI-users] Character Set

2012-08-30 Thread Vadim Zeitlin
On Thu, 30 Aug 2012 12:38:26 -0400 Candy Chiu candy.chiu...@gmail.com wrote: CC I have successfully compiled soci and soci-odbc using Visual Studio 2010. CC I managed to connect to a DB server and retrieve some data. Everything CC worked out well, except I had to change the Character Set

Re: [SOCI-users] SOCI // MySQL // failed test case 4

2012-09-27 Thread Vadim Zeitlin
On Thu, 27 Sep 2012 19:50:08 +0400 Sergei Nikulov sergey.niku...@gmail.com wrote: SN So it can be MSVS2010 issue. SN Can anybody confirm? Microsoft CRT has known issues with converting NaNs and infinities to/from strings and behaves differently from most (all?) Unix libc implementations, so

Re: [SOCI-users] ODBC: adding an accessor to retrieve the completed connection string?

2012-10-03 Thread Vadim Zeitlin
On Tue, 18 Sep 2012 18:31:49 +0200 I wrote: Me So basically instead of just ignoring the string returned by Me SQLDriverConnect() in odbc_session_backend ctor I'd like to store it in a Me member variable and add a get_connection_string() accessor to Me odbc_session_backend class. Me Me Would

Re: [SOCI-users] Add CMake support for Firebird

2012-10-03 Thread Vadim Zeitlin
On Mon, 1 Oct 2012 23:16:11 +0400 Sergei Nikulov sergey.niku...@gmail.com wrote: SN Here the patches for enabling Firebird backend in cmake. SN I've tested it on Windows 7 and Fedora Linux 16. Thanks a lot, I'm going to test and apply them soon. I'll try to modify the cmake files to support

Re: [SOCI-users] Commit odbc backend updates

2012-10-23 Thread Vadim Zeitlin
On Tue, 23 Oct 2012 14:38:57 -0400 Candy Chiu candy.chiu...@gmail.com wrote: CC 1. Fixed a bug in preparing a vector of strings for binding. The current CC implementation inserted an extra white character to the end of each string. CC This error shows up in SQL Server, not in MySQL (via ODBC).

Re: [SOCI-users] Commit odbc backend updates

2012-10-24 Thread Vadim Zeitlin
On Wed, 24 Oct 2012 08:44:37 -0400 Candy Chiu candy.chiu...@gmail.com wrote: CC I am only allowed access to a SQL Server at work, and don't have access to CC a ORACLE server. You could test this case by simply (temporarily) changing odbc_standard_type_backend_base::use_string_for_bigin() to

Re: [SOCI-users] Compiling the example code with Visual Studio 2012

2012-10-31 Thread Vadim Zeitlin
On Wed, 31 Oct 2012 22:49:10 +0100 Alberto hirakey...@gmail.com wrote: A I'm new to SOCI, after three days of tryings I finally build it using CMake A from command line without erros, and now I was trying to compile the A example code. The problem is it gives me a number of error in the main.obj

Re: [SOCI-users] Compiling the example code with Visual Studio 2012

2012-11-01 Thread Vadim Zeitlin
On Thu, 1 Nov 2012 13:16:16 +0100 Alberto hirakey...@gmail.com wrote: A It looks like you simply don't link with the SOCI libraries -- do you? A I got it. This is what I linked: A C:\dev\soci-3.1.0\core; C:\dev\soci-3.1.0\backends\postgresql; A C:\dev\PostgreSQL9.2.1\include A And this is a

Re: [soci-users] [RFC] Apply Git branching model

2012-11-16 Thread Vadim Zeitlin
On Fri, 16 Nov 2012 12:57:23 + Mateusz Loskot mate...@loskot.net wrote: ML I'm thinking about structuring SOCI development and following ML some well-known GitHub practices regarding branching, tagging, etc. ML ML I've proposed some ideas as a task here: ML ML

Re: [soci-users] MySQL Query: select round( -111100237735.42999, 2 )

2013-01-28 Thread Vadim Zeitlin
On Mon, 28 Jan 2013 10:52:44 -0800 Pawel Aleksander Fedorynski pfe...@gmail.com wrote: PAF Do you think we should just allow PAF PAF string s; PAF sql select 3.14, into(s); PAF PAF or do you think some new syntax for extra type safety would be warranted, PAF e.g., PAF PAF string s; PAF sql

Re: [soci-users] release plans

2013-01-31 Thread Vadim Zeitlin
On Thu, 31 Jan 2013 16:18:22 + Mateusz Loskot mate...@loskot.net wrote: ML Meanwhile, plenty of bug fixes and numerous contributions ML have been submitted (big thanks to everyone who helped!). ML So, I'd be inclined to release SOCI 3.2.0 sooner. ML In fact, the current master compiles, tests

[soci-users] RFD: how to specify whether ODBC backend should prompt the user?

2013-01-31 Thread Vadim Zeitlin
Hello, At least under Windows, it's common for the ODBC driver to show a dialog box to the user asking to enter the missing information when connecting via a predefined DSN. Typically, the password is not stored in the DSN, where it could be easily seen, but entered during connection time in

Re: [soci-users] MySQL Query: select round( -111100237735.42999, 2 )

2013-02-03 Thread Vadim Zeitlin
On Sat, 2 Feb 2013 20:39:00 + Mateusz Loskot mate...@loskot.net wrote: ML On 29 January 2013 17:40, Pawel Aleksander Fedorynski pfe...@gmail.com wrote: ML into_as_raw_text() sounds good to me. The final decision belongs to ML Mateusz. ML ML Nah, we should get this as well as other

Re: [soci-users] RFD: how to specify whether ODBC backend should prompt the user?

2013-02-03 Thread Vadim Zeitlin
On Sat, 2 Feb 2013 21:37:58 + Mateusz Loskot mate...@loskot.net wrote: ML On 31 January 2013 21:11, Vadim Zeitlin vz-s...@zeitlins.org wrote: ML At least under Windows, it's common for the ODBC driver to show a dialog ML box to the user asking to enter the missing information when

Re: [soci-users] MySQL Query: select round( -111100237735.42999, 2 )

2013-02-03 Thread Vadim Zeitlin
On Sun, 3 Feb 2013 14:17:49 -0800 Pawel Aleksander Fedorynski pfe...@gmail.com wrote: PAF It occurs to me that some other db engines (Oracle?) probably send values PAF in non-string format, what should into_as_raw_text() do then? PAF PAF (a) signal an error? PAF PAF (b) put the raw value

Re: [soci-users] [SOCI-users] Is it correct to silently ignore truncations?

2013-02-03 Thread Vadim Zeitlin
On Sun, 3 Feb 2013 19:28:48 + Mateusz Loskot mate...@loskot.net wrote: ML I reckon, it could be added in SOCI 4.0.0 or later. ML Feel free to add it to https://github.com/SOCI/soci/wiki/Roadmap ML so it's not missed. OK, thanks, I've created https://github.com/SOCI/soci/issues/51 and added

Re: [soci-users] MySQL Query: select round( -111100237735.42999, 2 )

2013-02-03 Thread Vadim Zeitlin
On Sun, 3 Feb 2013 14:31:06 -0800 Pawel Aleksander Fedorynski pfe...@gmail.com wrote: PAF On Sun, Feb 3, 2013 at 2:26 PM, Vadim Zeitlin vz-s...@zeitlins.org wrote: PAF PAF On Sun, 3 Feb 2013 14:17:49 -0800 Pawel Aleksander Fedorynski PAF pfe...@gmail.com wrote: PAF PAF PAF It occurs to me

Re: [soci-users] What is status of integer types support?

2013-02-05 Thread Vadim Zeitlin
On Tue, 5 Feb 2013 01:53:27 + Mateusz Loskot mate...@loskot.net wrote: ML Here are my findings: ML ML 1) Here is old thread unsigned int and SOCI from 2010 in which Maciej ML explains reasoning behind certain decisions regarding lack of unsigned int ML mapping: ML ML

Re: [soci-users] RFD: how to specify whether ODBC backend should prompt the user?

2013-02-10 Thread Vadim Zeitlin
On Mon, 4 Feb 2013 01:05:39 + Mateusz Loskot mate...@loskot.net wrote: ML On 3 February 2013 21:39, Vadim Zeitlin vz-s...@zeitlins.org wrote: ... ML I'd like to propose with the solution based on adding a ML soci::backend_options class which would just wrap std::mapstring, string ML

Re: [soci-users] Firebird tested on Linux

2013-02-18 Thread Vadim Zeitlin
On Mon, 18 Feb 2013 13:53:27 + Mateusz Loskot mate...@loskot.net wrote: ML It should work automatically. I didn't realize it was as smart as this, sorry, I should have just waited a bit instead of asking. ML See the screenshot attached, this build failed as meanwhile ML I'd broken the

Re: [soci-users] RFD: how to specify whether ODBC backend should prompt the user?

2013-03-08 Thread Vadim Zeitlin
On Mon, 11 Feb 2013 13:13:44 + Mateusz Loskot mate...@loskot.net wrote: ML Yet another proposal open for comments: ML ML What about using the little Encapsulated Context pattern? ... ML Implementation options: ML ML 1) Keep current soci::session interface for backward compatibility, ML add

[soci-users] 2 important Firebird fixes before 3.2.0

2013-03-22 Thread Vadim Zeitlin
the tests as without them current Firebird is simply unusable for us and anybody else either re-using the same statement more than once or reading any floating point numbers from the database. Thanks, VZ From 8072cd75d757a35c91c81f14a997cad54a96c86f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin vz-s

Re: [soci-users] 2 important Firebird fixes before 3.2.0

2013-03-23 Thread Vadim Zeitlin
On Fri, 22 Mar 2013 14:40:36 + Mateusz Loskot mate...@loskot.net wrote: ML ML If you say we can release without the tests added, just with the ML ML fixes, let's do so. ML ML The endOfRowSet fix is perfectly safe to apply, it can't break anything ML because it changes nothing if

[soci-users] Using a unit testing framework?

2013-03-23 Thread Vadim Zeitlin
Hello, I've done my first modifications to the SOCI unit tests recently and it wasn't a very pleasant experience. The 2 main reasons for this are the rather unusual tests organization and the use of assert() instead of some more advanced mechanism. I'm especially riled by the latter because

Re: [soci-users] 2 important Firebird fixes before 3.2.0

2013-03-23 Thread Vadim Zeitlin
On Sun, 24 Mar 2013 00:10:15 +0400 Viacheslav Naydenov vac...@yandex.ru wrote: VN 23.03.2013, 16:49, Vadim Zeitlin vz-s...@zeitlins.org: VN On Fri, 22 Mar 2013 14:40:36 + Mateusz Loskot mate...@loskot.net wrote: VN VN ML  The endOfRowSet fix is perfectly safe to apply, it can't break

Re: [soci-users] Using a unit testing framework?

2013-03-23 Thread Vadim Zeitlin
On Sat, 23 Mar 2013 15:54:54 +0100 Denis Arnaud denis.arnaud_s...@m4x.org wrote: DA Hi Vadim, DA DA Boost.Test, in combination with CMake, works pretty well. Hello Denis, I have no doubt that Boost.Test works well, I used it in several projects (CMake -- not so much, but it's a different

Re: [soci-users] Using a unit testing framework?

2013-03-24 Thread Vadim Zeitlin
On Sun, 24 Mar 2013 01:13:10 -0300 Ricardo Fabiano de Andrade ricardofabianodeandr...@gmail.com wrote: RFdA Currently, I'm working with googletest. It's suprisingly simple to RFdA get used to and extremely produtive. What are the advantages of Google Test compared to Boost.Test? I know that

Re: [soci-users] Using a unit testing framework?

2013-03-25 Thread Vadim Zeitlin
On Mon, 25 Mar 2013 11:22:39 + (GMT) Bruce Adams tortoise...@yahoo.co.uk wrote: BA I would highly recommend cppunit as a unit test framework (based on the BA xunit framework). I have very strong feelings about cppunit and would love dearly to use anything else but it. The best thing I can

Re: [soci-users] SOCI 3.2.0 released

2013-03-26 Thread Vadim Zeitlin
On Tue, 26 Mar 2013 02:57:32 + Mateusz Loskot mate...@loskot.net wrote: ML On behalf of the whole SOCI team I extremely pleased to ML announce this new release of SOCI 3.2.0 version. Congratulations for making this release (and more or less on time, too ;-) and, more generally, thanks a lot

Re: [soci-users] The next three big things

2013-03-28 Thread Vadim Zeitlin
On Thu, 28 Mar 2013 15:18:30 + Mateusz Loskot mate...@loskot.net wrote: ML There has been interesting discussions about integer support ML and new tests lately and I'll follow up in relevant threads in details soon. ML There is also lots of ideas and brainstorming about future plans: ML ML

Re: [soci-users] Using a unit testing framework?

2013-04-08 Thread Vadim Zeitlin
On Sun, 7 Apr 2013 04:52:48 +0100 Mateusz Loskot mate...@loskot.net wrote: ML Here are some of my more important points: ML ML Using gtest + gmock will effectively add two new ML dependencies to SOCI. Same for CATCH + Turtle (or other mocker). ML Using Boost.Test + Turtle (Boost.Mock) will add,

Re: [soci-users] Using a unit testing framework?

2013-04-08 Thread Vadim Zeitlin
On Mon, 8 Apr 2013 16:56:20 +0100 Mateusz Loskot mate...@loskot.net wrote: ML ML Neither CATCH nor Turtle seems to be packaged, ML ML Again, CATCH is not packaged because it doesn't need packaging, this is ML the appealing part. ML ML I meant packages deploying, like its common to have

Re: [soci-users] Slides from SOCI talk at London C++ Meeting

2013-05-30 Thread Vadim Zeitlin
On Tue, 28 May 2013 23:38:47 +0100 Mateusz Loskot mate...@loskot.net wrote: ML I've just came back form the first London C++ Meeting ML at Google Campus [1] where I had pleasure to give introductory ML talk about SOCI, on basic idea behind the library and ML core concepts the library heavily

Re: [soci-users] Ways to deal with many columns

2013-06-22 Thread Vadim Zeitlin
On Sat, 22 Jun 2013 15:49:07 -0600 Jordan Woehr jordanwo...@gmail.com wrote: JW However, for inserting I'm having difficulty. What I want to achieve is JW something as follows: JW JW int vals[NUM_VALS]; JW statement st = s.prepare INSERT INTO table (c0, c1, c2, ...) VALUES (; JW for(int i = 0;

Re: [soci-users] Support of MSSQL Server

2013-06-24 Thread Vadim Zeitlin
On Sun, 23 Jun 2013 13:03:32 +0200 (CEST) heiko.r...@code-styling.de heiko.r...@code-styling.de wrote: hs My plan is to clone the ODBC backend and come up with a first version hs of a new MSSQL interface. Hello, Having a native MS SQL backend would be very nice to have in any case, even

Re: [soci-users] Support of MSSQL Server

2013-06-24 Thread Vadim Zeitlin
On Mon, 24 Jun 2013 16:47:32 +0100 Mateusz Loskot mate...@loskot.net wrote: ML hs But there is a global issue doing so. I need the extends the core with ML hs support of ML hs ML hs #define SQL_WCHAR (-8) ML hs #define SQL_WVARCHAR (-9) ML hs ML hs with a new core

Re: [soci-users] How to get the final query string

2013-11-12 Thread Vadim Zeitlin
On Fri, 8 Nov 2013 18:12:13 +0100 JP jp.garcia.or...@gmail.com wrote: J is there any way to get the final query string that is used by the backend? J The available methods like get_last_query and get_query_strem return J the query string as specified to the session, without replacing the items J

Re: [soci-users] Changing the default branch in the Github repository?

2015-03-22 Thread Vadim Zeitlin
On Sun, 22 Mar 2015 11:36:23 -0700 Pawel Aleksander Fedorynski pfe...@gmail.com wrote: PAF So from my reading it seems we don't have a clear agreement here? Apparently not. I'd just like to point out that since I had started this thread there was another PR mistakenly done against master

Re: [soci-users] Changing the default branch in the Github repository?

2015-03-16 Thread Vadim Zeitlin
On Sun, 15 Mar 2015 20:31:12 -0700 Pawel Aleksander Fedorynski pfe...@gmail.com wrote: PAF I don't really understand the implications of what you're asking for, Sorry, let me try to explain it better: when somebody creates a pull request for SOCI repository, currently it defaults to the master

Re: [soci-users] Changing the default branch in the Github repository?

2015-03-17 Thread Vadim Zeitlin
On Tue, 17 Mar 2015 10:11:26 +0100 Sebastian Lauwers sebastian.lauw...@gmail.com wrote: SL I'd like to recommend /against/ this. There are two major implications: SL SL - All PRs will default against `develop`, which is what you're asking, SL - Upon cloning, the checked-out branch will be

Re: [soci-users] Changing the default branch in the Github repository?

2015-03-25 Thread Vadim Zeitlin
On Wed, 25 Mar 2015 10:19:27 +0100 Mateusz Loskot mate...@loskot.net wrote: ML Having master checked out, I'm ready to submit patches back straight away. Sure, you can submit them -- but currently, i.e. when using git flow with Github, they can't be merged easily (i.e. using the single button

[soci-users] More detailed exception error messages

2015-04-01 Thread Vadim Zeitlin
Hello, I'd like to return to the following problem: currently, if an SQL query fails, you often have no idea why exactly did it fail because you don't have the values of its parameters. A typical example we have to deal with is that the process importing some data files into the database stops

[soci-users] Isn't it legal to execute the same statement multiple times?

2015-02-25 Thread Vadim Zeitlin
Hello, I'd just like to check if I'm not missing something obvious here: I thought it was perfectly fine to execute the same statement more than once with different parameter values, e.g. do something like this: int f; statement st = (sql.prepare insert into t(f) values(:f),

Re: [soci-users] RFD: Using CATCH for tests

2015-03-27 Thread Vadim Zeitlin
On Fri, 27 Mar 2015 10:05:32 +0100 Mateusz Loskot mate...@loskot.net wrote: ML OK, thanks for your support! I won't be able to finish this today, but ML I'll try to do it tomorrow or, if this fails too, early next week. One way ML or the other, I really want to get CATCH in. ML ML No

Re: [soci-users] RFD: Using CATCH for tests

2015-03-26 Thread Vadim Zeitlin
On Thu, 26 Mar 2015 20:17:27 +0100 Mateusz Loskot mate...@loskot.net wrote: ML Assuming there are no objections to using it, I'd like to add catch.hpp ML (https://github.com/philsquared/Catch/blob/master/single_include/catch.hpp) ML directly to SOCI repository, e.g. as tests/catch.hpp. I

[soci-users] CMake and Windows builds

2015-04-14 Thread Vadim Zeitlin
Hi, Speaking of CMake, how exactly is it supposed to be used under Windows? I've never used it there with SOCI as we have our own project/solution files there, but I thought I could just do cmake and then build the generated solution and apparently this doesn't work because the link

Re: [soci-users] CMake and Windows builds

2015-04-14 Thread Vadim Zeitlin
On Tue, 14 Apr 2015 19:54:08 +0200 Mateusz Loskot mate...@loskot.net wrote: ML It should be easy really. The hardest part is to collect the dependencies. MySQL ones seem to be installed and found, yet linking doesn't work... ML It's been long time since I've done any personal projects on

Re: [soci-users] Behavior when signed numeric type is to small with soci::into

2015-08-24 Thread Vadim Zeitlin
On Tue, 18 Aug 2015 11:27:47 + Klemm, Markus markus.kl...@cicor.com wrote: KM What will soci do when I have for example an signed int with a width of KM 32 bit and binds it to the output via soci::into, to a query, which KM yields a high signed value. I assume I will get a soci_error or the

Re: [soci-users] Firebird 3.0

2019-12-07 Thread Vadim Zeitlin
On Sat, 7 Dec 2019 15:42:39 -0500 Gavin M2301 wrote: GM> Anyone using firebird 3 with soci? Yes, we do, without any problems so far. VZ pgplwQPdTl55V.pgp Description: PGP signature ___ soci-users mailing list soci-users@lists.sourceforge.net

Re: [soci-users] ODBC Backend vector use std::string

2020-02-08 Thread Vadim Zeitlin
On Fri, 7 Feb 2020 20:47:56 + Andrew Grafham wrote: AG> Should it be possible to do the following but with std::string instead of AG> int? (Example taken from here - AG> http://soci.sourceforge.net/doc/release/3.2/statements.html ) I'm not completely sure, to be honest, but I think that

[soci-users] SOCI 4.0.1 released

2020-10-19 Thread Vadim Zeitlin
- Rommel Trindade - Ross Marwood - Theo van Klaveren - William Blough - XiaoGuang Zeng - Xuewen Wang - Enrico Detoma We hope you will find this release useful! Vadim Zeitlin on behalf of SOCI development team pgpHjAPnvt2QE.pgp Description: PGP signature

Re: [soci-users] update firebird 3.0 Win 10 MSVC 19

2021-05-13 Thread Vadim Zeitlin
On Thu, 13 May 2021 10:05:37 -0400 Jim McNamara wrote: JM> It does not output an error. The code sample listed above JM> doesn't execute cout << "2" . I don't use gdb for debugging. I think you should. Sorry, but there is clearly something very weird going on your machine and you do need to

Re: [soci-users] firebird quick question

2021-05-10 Thread Vadim Zeitlin
On Wed, 5 May 2021 04:51:58 -0400 Jim McNamara wrote: JM> It doesn't want to print the value of count when I do a cout << count. You need to debug it to understand what's going on because the code looks fine to me, but the first stupid question is whether it really doesn't print them or if

Re: [soci-users] SOCI API's-> ODBC backend -> MS SQL -> schema name -> table names.

2021-05-10 Thread Vadim Zeitlin
On Sun, 9 May 2021 21:16:04 -0500 Ravi chandra wrote: Rc> Hi SOCI developers, Rc> Rc> [A] I had to change this string to get the Table names from MS SQL SERVER Rc> default schema "dbo". Rc> Rc> virtual std::string get_table_names_query() const Rc> { Rc> return "select

Re: [soci-users] update firebird 3.0 Win 10 MSVC 19

2021-05-12 Thread Vadim Zeitlin
On Tue, 11 May 2021 20:31:58 -0400 Jim McNamara wrote: JM> Here is my output. I tried to neaten up my include code and I put in very JM> basic debugging. It never gets past the connect string with the JM> service, username, and password. What do you mean by this? Does it output an error

Re: [soci-users] Firebird backend

2021-05-04 Thread Vadim Zeitlin
On Mon, 3 May 2021 19:25:32 -0400 Jim McNamara wrote: JM> Is soci able to be used with firebird 3.x? Yes, we use SOCI with Firebird 3 and it works perfectly fine. Regards, VZ pgp7alXGrKqqb.pgp Description: PGP signature ___ soci-users mailing

[soci-users] Does anybody use DB/2 backend?

2021-04-06 Thread Vadim Zeitlin
Hello, I'd like to know if anybody at all is using DB/2 backend. On one hand, it's not very difficult to maintain it because it's very similar to the ODBC backend which I'm interested in maintaining anyhow, but OTOH it would still be simpler to drop it if it's not used, if only because I've

[soci-users] Preparing for SOCI 4.0.2 release

2021-04-07 Thread Vadim Zeitlin
Hello, I plan to officially announce 4.0.2 on April 19. I don't plan any more changes right now, but the delay until then should hopefully give enough time to find (and maybe fix) any bugs introduced by the latest round of changes, so please try to test your code with the current master or

[soci-users] SOCI 4.0.2 released

2021-04-20 Thread Vadim Zeitlin
) - George Rhoten - Ilya Sinitsyn - Ivan Kuvaldini - Jiahao XU - Jörn Reimerdes - Kyle Edwards - Mariana Meireles - Noah Shutty - root (at begeton.com) - Thibault Martinez We hope you will find this release useful! Vadim Zeitlin on behalf of SOCI development team pgp2LUkV6Y7QT.pgp Description: PGP

Re: [soci-users] MySQL / MariaDB bulk insert support.

2021-09-02 Thread Vadim Zeitlin
On Thu, 2 Sep 2021 10:04:45 +0100 Andrew Grafham wrote: AG> I'm looking at this again and the backend with support for bulk operations AG> is very different from the current MySQL version. In fact, the structure is AG> more similar to the ODBC backend. I was wondering about having essentially

Re: [soci-users] MySQL / MariaDB bulk insert support.

2021-08-05 Thread Vadim Zeitlin
On Thu, 5 Aug 2021 16:39:20 +0100 Andrew Grafham wrote: AG> Are there any plans to add support for Array Binding (as mentioned AG> here MYSQL_BIND AG> - MariaDB Knowledge Base ) to the AG> MySQL backend? I don't use MySQL myself currently, so I don't

Re: [soci-users] MySQL / MariaDB bulk insert support.

2021-08-09 Thread Vadim Zeitlin
On Mon, 9 Aug 2021 10:12:45 +0100 Andrew Grafham wrote: AG> Any ideas how it would detect at runtime whether the server supports bulk AG> operations or not? Sorry, no, I thought it would be just a server version check, but I didn't realize it would be so problematic. And if there is some

Re: [soci-users] MySQL / MariaDB bulk insert support.

2021-08-06 Thread Vadim Zeitlin
On Fri, 6 Aug 2021 09:28:33 +0100 Andrew Grafham wrote: AG> Would we need to keep backward compatibility with older versions of MariaDB AG> that don't support Array Binding? Sorry, I really don't know much (well, anything) about M{y,aria}SQL API. Which version added support for the array

Re: [soci-users] cmake not working for me

2021-10-24 Thread Vadim Zeitlin
On Fri, 22 Oct 2021 22:44:48 -0400 Jim McNamara wrote: JM> Hi all- JM> I can't get the .sln file to appear so I can run msbuild.exe SOCI.sln. JM> JM> cmake -DSOCI_CXX11=ON -DWITH_BOOST=OFF -DWITH_ORACLE=OFF -DWITH_DB2=OFF JM> -DWITH_MYSQL=OFF -DWITH_ODBC=OFF -DWITH_POSTGRESQL=OFF

[soci-users] SOCI 4.0.3 released

2022-02-10 Thread Vadim Zeitlin
gaocheng3 (at asiainfo.sg) gypsy5oul Ilya Sinitsyn Juan Jose Castellanos Lorenz Brun Lukas Zanner Mariana Meireles Matheus Gabriel Werny de Lima Mathäus Mendel please see the AUTHORS file for the full list of contributors. We hope you will find this release useful! Vadim Zeitlin on behalf of SOCI

Re: [soci-users] Dynamic binding and prefetching

2023-04-24 Thread Vadim Zeitlin
On Tue, 18 Apr 2023 16:22:46 + LUCAS AYALA FRAGOSO wrote: LAF> I've got a question regarding dynamic binding and bulk operations LAF> (only for DQLs). It is possible to do dynamic binding with bulk LAF> operations in order to reduce network roundtrips? LAF> LAF> I have to use the Core

Re: [soci-users] Soci 4.0.3 in-source-build for windows/mac/linux (problem only in windows)

2023-04-25 Thread Vadim Zeitlin
On Tue, 25 Apr 2023 09:48:15 +0200 Tomaz Canabrava wrote: TC> My name is Tomaz Canabrava, I'm a Opensource developer mostly interested in TC> contributing back to projects that I use. Hi Tomaz and welcome! I'm also an open source developer interested in exactly the same thing, but this has