21#include <com/sun/star/sdbc/DataType.hpp>
22#include <com/sun/star/sdbc/TransactionIsolation.hpp>
25#include <com/sun/star/sdbc/ColumnSearch.hpp>
44 bool equal(
const char *str1,
const char *str2)
46 return str1 ==
nullptr || str2 ==
nullptr ? str1 == str2 : strcmp(str1, str2) == 0;
63 "list-show-addresses",
72 {
"addr-line1",
DEFAULT_ADDR_LINE1},{
"addr-line2",
DEFAULT_ADDR_LINE2},{
"city",
DEFAULT_CITY},{
"state",
DEFAULT_STATE},{
"country",
DEFAULT_COUNTRY},{
"zip",
DEFAULT_ZIP},
73 {
"work-addr-line1",
WORK_ADDR_LINE1},{
"work-addr-line2",
WORK_ADDR_LINE2},{
"work-city",
WORK_CITY},{
"work-state",
WORK_STATE},{
"work-country",
WORK_COUNTRY},{
"work-zip",
WORK_ZIP},
74 {
"home-addr-line1",
HOME_ADDR_LINE1},{
"home-addr-line2",
HOME_ADDR_LINE2},{
"home-addr-City",
HOME_CITY},{
"home-state",
HOME_STATE},{
"home-country",
HOME_COUNTRY},{
"home-zip",
HOME_ZIP},
75 {
"other-addr-line1",
OTHER_ADDR_LINE1},{
"other-addr-line2",
OTHER_ADDR_LINE2},{
"other-addr-city",
OTHER_CITY},{
"other-addr-state",
OTHER_STATE},{
"other-addr-country",
OTHER_COUNTRY},{
"other-addr-zip",
OTHER_ZIP}
88 pToBeFields[
nFields]->
pField = g_param_spec_ref(g_param_spec_string (evo_addr[
i].pColumnName,evo_addr[
i].pColumnName,
"",
nullptr,G_PARAM_WRITABLE));
99 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
107 pProps = g_object_class_list_properties
108 (
static_cast<GObjectClass *
>(g_type_class_ref(
E_TYPE_CONTACT )),
111 for ( guint
i = 0;
i < nProps;
i++ )
113 switch (pProps[
i]->value_type)
119 const char *
pName = g_param_spec_get_name( pProps[
i] );
120 for (
unsigned int j = 0; j < G_N_ELEMENTS(
pDenyList ); j++ )
163 return G_TYPE_STRING;
170 return nType == G_TYPE_STRING ? DataType::VARCHAR : DataType::BIT;
175 guint nRet = guint(-1);
181 if (
aName == aColName)
197 case DataType::VARCHAR:
214 aName = OStringToOUString( g_param_spec_get_name(
const_cast<GParamSpec *
>(pSpec) ),
215 RTL_TEXTENCODING_UTF8 );
229 g_param_spec_unref(
pFields[
i]->pField);
247 ,m_pConnection(_pCon)
249 OSL_ENSURE(
m_pConnection,
"OEvoabDatabaseMetaData::OEvoabDatabaseMetaData: No connection set!");
257 const Any& ,
const OUString& ,
const OUString& ,
258 const OUString& columnNamePattern )
300 ::osl::MutexGuard aGuard(
m_aMutex );
314 aRows.push_back( aRow );
318 pResultSet->setRows(std::move(aRows));
792 ::osl::MutexGuard aGuard(
m_aMutex );
839 return TransactionIsolation::NONE;
992 static const std::u16string_view sTableTypes[] =
999 auto nNbTypes = std::size(sTableTypes);
1001 for(std::size_t
i=0;
i < nNbTypes;++
i)
1007 pResult->setRows(std::move(aRows));
1045 tmp.push_back(aRow);
1050 tmp.push_back(aRow);
1053 pResultSet->setRows(std::move(aRows));
1067 const Any& ,
const OUString& ,
1070 ::osl::MutexGuard aGuard(
m_aMutex );
1077 static constexpr OUStringLiteral aTable(
u"TABLE");
1079 bool bTableFound =
true;
1080 sal_Int32
nLength = types.getLength();
1083 bTableFound =
false;
1085 const OUString* pBegin = types.getConstArray();
1086 const OUString* pEnd = pBegin +
nLength;
1087 for(;pBegin != pEnd;++pBegin)
1089 if(*pBegin == aTable)
1103 for (GList* liter = pSources; liter; liter = liter->next)
1126 RTL_TEXTENCODING_UTF8 );
1128 RTL_TEXTENCODING_UTF8 );
1139 aRows.push_back(aRow);
1142 g_list_foreach (pSources,
reinterpret_cast<GFunc
>(g_object_unref),
nullptr);
1143 g_list_free (pSources);
1145 pResult->setRows(std::move(aRows));
ESourceRegistry * get_e_source_registry()
EAPI_EXTERN gpointer(* e_source_get_extension)(ESource *source, const gchar *extension_name)
EAPI_EXTERN const gchar *(* e_source_backend_get_backend_name)(ESourceBackend *extension)
EAPI_EXTERN const gchar *(* e_source_get_display_name)(ESource *source)
EAPI_EXTERN gboolean(* e_source_has_extension)(ESource *source, const gchar *extension_name)
EAPI_EXTERN const gchar *(* e_source_get_uid)(ESource *source)
EAPI_EXTERN GList *(* e_source_registry_list_sources)(ESourceRegistry *registry, const gchar *extension_name)
#define E_SOURCE_EXTENSION_ADDRESS_BOOK
ORowSetValueDecorator decorates an ORowSetValue so the value is "refcounted".
SDBCAddress::sdbc_address_type getSDBCAddressType() const
mutable::osl::Mutex m_aMutex
const ColumnProperty * getField(guint n)
sal_Int32 getFieldType(guint nCol)
static ColumnProperty ** pFields
sal_Int32 const s_nNULLABLE
const SplitEvoColumns * get_evo_addr()
GType getGFieldType(guint nCol)
void free_column_resources()
static void splitColumn(ColumnProperty **pToBeFields)
OUString getFieldName(guint nCol)
sal_Int32 const s_nDECIMAL_DIGITS
sal_Int32 const s_nCOLUMN_SIZE
guint findEvoabField(std::u16string_view aColName)
static const char * pDenyList[]
OUString getFieldTypeName(guint nCol)
sal_Int32 const s_nCHAR_OCTET_LENGTH
bool match(const sal_Unicode *pWild, const sal_Unicode *pStr, const sal_Unicode cEscape)
::rtl::Reference< ORowSetValueDecorator > ORowSetValueDecoratorRef
gboolean bIsSplittedValue