implemented prepared statement for postgres and sqlite

This commit is contained in:
2023-12-09 11:08:03 +01:00
parent 8ba70cc79e
commit da423ea8bb
59 changed files with 1769 additions and 314 deletions
+15 -8
View File
@@ -3,6 +3,8 @@ set(HEADER
include/postgres_error.hpp
include/postgres_result_reader.hpp
include/postgres_dialect.hpp
include/postgres_statement.hpp
include/postgres_parameter_binder.h
)
set(SOURCES
@@ -10,17 +12,22 @@ set(SOURCES
src/postgres_error.cpp
src/postgres_result_reader.cpp
src/postgres_dialect.cpp
src/postgres_statement.cpp
src/postgres_parameter_binder.cpp
)
add_library(matador-postgres SHARED ${SOURCES} ${HEADER})
target_include_directories(matador-postgres PRIVATE
set(LIBRARY_TARGET matador-postgres)
add_library(${LIBRARY_TARGET} MODULE ${SOURCES} ${HEADER})
set_target_properties(${LIBRARY_TARGET}
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/backends"
)
target_include_directories(${LIBRARY_TARGET} PRIVATE
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/backends/postgres/include
${PostgreSQL_INCLUDE_DIRS})
target_link_libraries(matador-postgres matador ${PostgreSQL_LIBRARIES})
set_target_properties(matador-postgres
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/backends"
)
target_link_libraries(${LIBRARY_TARGET} matador ${PostgreSQL_LIBRARIES})