Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 23 12:43
    szymonwieloch opened #909
  • Sep 18 21:39
    vadz labeled #908
  • Sep 18 21:39
    vadz commented #908
  • Sep 14 02:21
    530967061 edited #908
  • Sep 14 02:17
    530967061 opened #908
  • Sep 10 14:06
    burluckij edited #906
  • Sep 10 14:01
    burluckij edited #906
  • Sep 10 13:44
    burluckij commented #906
  • Sep 09 22:26
    vadz labeled #907
  • Sep 09 22:26
    vadz opened #907
  • Sep 09 22:24
    vadz closed #906
  • Sep 09 22:24
    vadz commented #906
  • Sep 09 22:17
    vadz edited #906
  • Sep 09 17:18
    burluckij opened #906
  • Aug 29 20:48
    mawelo commented #905
  • Aug 29 17:02
    vadz commented #905
  • Aug 29 08:28
    mawelo opened #905
  • Aug 07 16:03
    vadz commented #904
  • Aug 07 13:55
    Jasonzyt commented #904
  • Aug 06 23:01
    adeolaibigbemi opened #904
Mateusz Łoskot
@mloskot
style is less important than correctness and tests coverage
amreisa
@amreisa
I will test it.
amreisa
@amreisa
I can't build with SOCI_TESTS. I report it.
Mateusz Łoskot
@mloskot
Travis and AppVeyor can. Id suggest you compare your env, config, commands, with those on the CI builds first, before reporting anything. I'm out for a week, I won't be able to look at anything.
amreisa
@amreisa
OK
amreisa
@amreisa
How I can test driver feature ?
amreisa
@amreisa
I can't find it in doc :(
amreisa
@amreisa
How I can test if driver support Transactions ?
amreisa
@amreisa
Any help ?
Mateusz Łoskot
@mloskot
SOCI is not ODBC with its SQLGetInfo and alike. You read the docs or, if those are lacking, you read the source code. I can't help any more.
amreisa
@amreisa
@mloskot I moving from QtSQL so I don't find many functons I need. I try to code that in my SOCI ver I will upload the code when I'm done.
Willian F
@wlfbitfc123
How can I build soci with support of mysql
amreisa
@amreisa
@wlfbitfc123 more info
Fedor Muratov
@muratovv
Hello everyone.
I have trouble with testing code which uses soci::session and failover callbacks. I need to check that implementation of failover callback handler uses as expected during reconnection. Also, I don't want to create an integration test with network shutdown.
Is Soci library contain mocks of a session or something for such testing? Thanks.
Mateusz Łoskot
@mloskot
Nope, there is no mocking used in SOCI tests, no mocking facilities provided. Iur tests are integration ones, require real databases
Fedor Muratov
@muratovv
Got it. Thank you.
Andrei Lebedev
@lebdron
@mloskot Hi! Could you please merge SOCI/soci#733 ? It would simplify code in our project a lot :)
Mateusz Łoskot
@mloskot
@lebdron Thanks for the reminder. Done
Fedor Muratov
@muratovv
@mloskot A problem with failover callback is still open. Could we discuss it in SOCI/soci#736 It is just a friendly reminder. Hope you or other maintainers have time for the conversation. Thank you.
Mateusz Łoskot
@mloskot
@muratovv No problem. Responded
amreisa
@amreisa
I need Some Hellp about instruction how to use SOCI from cmake as subporject "add_subdirectory(SOCI)"
I have long time try use It but SOCI::* not work.
amreisa
@amreisa
I want move from QtSql to SOCI.
amreisa
@amreisa
I opened ticket for that #792 .
Furkan ÖZOĞUL
@ozogulf_gitlab
Hi there
I need some help,
i build soci as a third-party in my project
my cmakelist;
cmake_minimum_required(VERSION 2.8)

project(DBDiscovery)
set(SOURCES src/genericdbconnection.cpp)
set(HEADERS src/genericdbconnection.h)

set(CMAKE_CXX_STANDARD 11)

set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(WITH_BOOST OFF)
set(WITH_ORACLE OFF)
set(WITH_SQLITE3 OFF)
set(WITH_FIREBIRD OFF)
set(WITH_DB2 OFF)
set(SOCI_TESTS OFF)

set(WITH_MYSQL ON)
set(MYSQL_INCLUDE_DIR /usr/include/mysql/)
set(WITH_ODBC ON)
set(ODBC_INCLUDE_DIR /usr/include/iodbc/)
set(WITH_POSTGRESQL ON)
set(POSTGRESQL_INCLUDE_DIR /usr/include/postgresql/)
set(SOCI_CXX11 ON)



add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/soci/")
add_executable(${PROJECT_NAME} "src/main.cpp" ${SOURCES} ${HEADERS})

include_directories(${CMAKE_SOURCE_DIR}/third-party/soci/include/)
#target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/third-party/soci/include/)
#target_link_libraries(${PROJECT_NAME} PRIVATE -lsoci_core -lsoci_mysql -ldl -lmysqlclient)
but when i am build my project i am getting error like that;
- /home/furkan/myfs/source-codes/DBDiscovery/third-party/soci/include/soci/mysql/soci-mysql.h:31:10: fatal error: mysql.h: No such file or directory
- error: #error "SOCI must be configured with C++11 support when using C++11"
         #error "SOCI must be configured with C++11 support when using C++11"
Mariana Meireles
@marimeireles
hello
try using -DSOCI_CXX11=ON
Furkan ÖZOĞUL
@ozogulf_gitlab
Actually i used this keyword in my cmakelist
Mariana Meireles
@marimeireles
hm
and you cleaned your build dir?
Furkan ÖZOĞUL
@ozogulf_gitlab
yes so many times :)
Mariana Meireles
@marimeireles
weird! :/
Furkan ÖZOĞUL
@ozogulf_gitlab
by the way i am using kubuntu 18.04
Mariana Meireles
@marimeireles

there's also

fatal error: mysql.h: No such file or directory

you should check where your dependencies are being installed
I had to force my lib dir to be the same as the other stuff I was using with -DSOCI_LIBDIR=lib

Furkan ÖZOĞUL
@ozogulf_gitlab
Nothing changed
Furkan ÖZOĞUL
@ozogulf_gitlab

@marimeireles when i changed my cmakelist like this;

cmake_minimum_required(VERSION 2.8)

project(DBDiscovery)
set(SOURCES src/genericdbconnection.cpp)
set(HEADERS src/genericdbconnection.h)

set(WITH_BOOST OFF)
set(WITH_ORACLE OFF)
set(WITH_SQLITE3 OFF)
set(WITH_FIREBIRD OFF)
set(WITH_DB2 OFF)
set(SOCI_TESTS OFF)
set(SOCI_SHARED OFF)
set(SOCI_EMPTY OFF)

set(WITH_MYSQL ON)
set(MYSQL_INCLUDE_DIR /usr/include/mysql/)
set(WITH_ODBC ON)
set(ODBC_INCLUDE_DIR /usr/include/iodbc/)
set(WITH_POSTGRESQL ON)
set(POSTGRESQL_INCLUDE_DIR /usr/include/postgresql/)
#set(CMAKE_CXX_STANDARD 17)
set(SOCI_CXX11 ON CACHE BOOL "Build to the C++11 standard")

add_subdirectory("${CMAKE_SOURCE_DIR}/third-party/soci/")


include_directories(${PROJECT_BINARY_DIR}/third-party/soci/include/
                    ${CMAKE_SOURCE_DIR}/third-party/soci/include/)
add_executable(${PROJECT_NAME} "src/main.cpp" ${SOURCES} ${HEADERS})

c++ 11 error solved

but still getting include dir error
Mariana Meireles
@marimeireles
cool =)
I assume you added your -DSOCI_LIBDIR= dir here
if yes... hm
maybe try to include this to your project: https://github.com/jupyter-xeus/xeus-sql/blob/master/cmake/Findmysql.cmake
so it finds the mysql?
Furkan ÖZOĞUL
@ozogulf_gitlab
also getting same include dir error postgre and odbc
Mariana Meireles
@marimeireles
did this work for mysql?
Furkan ÖZOĞUL
@ozogulf_gitlab
Nope, i guess i'll use different api/framework
But i will definitely try soci
Mariana Meireles
@marimeireles
maybe you could open an issue?
I'm just an user too, not super inside the stuff
also had a lot of problems with the cmake
amreisa
@amreisa
@marimeireles I know what you are missing. Include files at build dir.
Mariana Meireles
@marimeireles
I don't have this problem anymore, it's @ozogulf_gitlab
was just trying to help them
Mariana Meireles
@marimeireles
oh yeah, folks
I'd like to share with you the culmination of my latest work: https://medium.com/p/ef4a00a0d925/
I built an integration to jupyter using SOCI, so now you can use SOCI's power on jupyter notebooks and plot graphs with the output of your queries using vega lite :)
thanks for the amazing tool!