39#include <com/sun/star/beans/XPropertySet.hpp>
40#include <com/sun/star/sdbc/XParameters.hpp>
41#include <com/sun/star/util/Date.hpp>
42#include <com/sun/star/util/Time.hpp>
43#include <com/sun/star/util/DateTime.hpp>
45#include <rtl/ustrbuf.hxx>
46#include <rtl/string.hxx>
57using deleter_from_fn = std::integral_constant<
decltype(fn), fn>;
67OString
OUStringToOString( std::u16string_view str, ConnectionSettings
const *settings);
69void bufferQuoteConstant( OUStringBuffer & buf, std::u16string_view str, ConnectionSettings *settings );
75 const css::uno::Reference< css::beans::XPropertySet > & column );
79 OUStringBuffer & buf, std::u16string_view schema, std::u16string_view
name,
ConnectionSettings *settings );
83 std::u16string_view schema,
84 std::u16string_view
name,
85 std::u16string_view col,
91 const css::uno::Reference< css::beans::XPropertySet > &key,
95 const css::uno::Reference< css::beans::XPropertySet > & descriptor,
96 const OUString &
name );
99 const css::uno::Reference< css::beans::XPropertySet > & descriptor,
100 const OUString &
name );
103 const css::uno::Reference< css::beans::XPropertySet > & descriptor,
104 const OUString &
name );
106void disposeNoThrow(
const css::uno::Reference< css::uno::XInterface > & r );
107void disposeObject(
const css::uno::Reference< css::uno::XInterface > & r );
114void tokenizeSQL(
const OString &
sql, std::vector< OString > &vec );
115void splitSQL(
const OString &
sql, std::vector< OString > &vec );
116std::vector< sal_Int32 >
parseIntArray(
const OUString & str );
118std::vector< css::uno::Any >
parseArray( std::u16string_view str );
120OUString
array2String(
const css::uno::Sequence< css::uno::Any > &seq );
123 const css::uno::Reference< css::uno::XInterface > & stmt );
130 const css::uno::Reference< css::sdbc::XConnection > &conn,
131 const OUString &schema,
132 const OUString &table );
134css::uno::Sequence< sal_Int32 >
string2intarray(
const OUString & str );
137 const Int2StringMap &map,
const css::uno::Sequence< sal_Int32> &source );
142 const css::uno::Reference< css::sdbc::XConnection > &connection,
143 const OUString &query );
149bool implSetObject(
const css::uno::Reference< css::sdbc::XParameters >& _rxParameters,
150 const sal_Int32 _nColumnIndex,
const css::uno::Any& _rValue);
154 css::uno::Reference< css::uno::XInterface >
d;
156 explicit DisposeGuard(
const css::uno::Reference< css::uno::XInterface > & r );
163 css::uno::Reference< css::sdbc::XStatement >
m_stmt;
css::uno::Reference< css::uno::XInterface > d
DisposeGuard(const css::uno::Reference< css::uno::XInterface > &r)
TransactionGuard(const css::uno::Reference< css::sdbc::XStatement > &stmt)
takes over ownership of given statement
css::uno::Reference< css::sdbc::XStatement > m_stmt
void executeUpdate(const OUString &sql)
OString extractSingleTableFromSelect(const std::vector< OString > &vec)
bool implSetObject(const Reference< XParameters > &_rxParameters, const sal_Int32 _nColumnIndex, const Any &_rValue)
void bufferQuoteConstant(OUStringBuffer &buf, std::u16string_view value, ConnectionSettings *settings)
bool isWhitespace(sal_Unicode c)
void bufferQuoteQualifiedIdentifier(OUStringBuffer &buf, std::u16string_view schema, std::u16string_view table, ConnectionSettings *settings)
OUString extractTableFromInsert(std::u16string_view sql)
OUString concatQualified(std::u16string_view a, std::u16string_view b)
OUString array2String(const css::uno::Sequence< Any > &seq)
sal_Int32 extractIntProperty(const Reference< XPropertySet > &descriptor, const OUString &name)
css::uno::Sequence< sal_Int32 > string2intarray(const OUString &str)
std::vector< sal_Int32 > parseIntArray(const OUString &str)
OUString sqltype2string(const Reference< XPropertySet > &desc)
void tokenizeSQL(const OString &sql, std::vector< OString > &vec)
void bufferQuoteAnyConstant(OUStringBuffer &buf, const Any &val, ConnectionSettings *settings)
void extractNameValuePairsFromInsert(String2StringMap &map, const OString &lastQuery)
OUString querySingleValue(const css::uno::Reference< css::sdbc::XConnection > &connection, const OUString &query)
OUString extractStringProperty(const Reference< XPropertySet > &descriptor, const OUString &name)
std::unordered_map< OString, OString > String2StringMap
void splitConcatenatedIdentifier(std::u16string_view source, OUString *first, OUString *second)
void disposeNoThrow(const css::uno::Reference< css::uno::XInterface > &r)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
OUString getColExprForDefaultSettingVal(ConnectionSettings const *settings)
Sequence< OUString > convertMappedIntArray2StringArray(const Int2StringMap &map, const Sequence< sal_Int32 > &intArray)
Reference< XConnection > extractConnectionFromStatement(const Reference< XInterface > &stmt)
void bufferQuoteIdentifier(OUStringBuffer &buf, std::u16string_view toQuote, ConnectionSettings *settings)
void bufferEscapeConstant(OUStringBuffer &buf, std::u16string_view value, ConnectionSettings *settings)
void splitSQL(const OString &sql, std::vector< OString > &vec)
std::unordered_map< sal_Int32, OUString > Int2StringMap
void bufferKey2TableConstraint(OUStringBuffer &buf, const Reference< XPropertySet > &key, ConnectionSettings *settings)
bool extractBoolProperty(const Reference< XPropertySet > &descriptor, const OUString &name)
void disposeObject(const css::uno::Reference< css::uno::XInterface > &r)
std::vector< Any > parseArray(std::u16string_view str)
sal_Int32 typeNameToDataType(const OUString &typeName, std::u16string_view typtype)
returns the constant from sdbc.DataType
void fillAttnum2attnameMap(Int2StringMap &map, const Reference< css::sdbc::XConnection > &conn, const OUString &schema, const OUString &table)