namespace sdb { class XSingleSelectQueryComposer;
} namespace sdbcx { class XTablesSupplier;
} namespace sdbc { class XConnection; class XDatabaseMetaData; class XRowSet; class XDataSource; class SQLException; class XParameters; class XRowUpdate;
} namespace beans { class XPropertySet;
} namespace awt { class XWindow;
} namespace lang { struct Locale;
} namespace container { class XNameAccess;
} namespace uno { class XComponentContext;
} namespace util { class XNumberFormatTypes; class XNumberFormatsSupplier;
} namespace task { class XInteractionHandler;
}
}
class SvStream;
namespace dbtools
{ class ISQLStatementHelper; typedef ::utl::SharedUNOComponent< css::sdbc::XConnection > SharedConnection;
// calculates the default numberformat for a given datatype and a give language
OOO_DLLPUBLIC_DBTOOLS
sal_Int32 getDefaultNumberFormat(const css::uno::Reference< css::beans::XPropertySet >& _xColumn, const css::uno::Reference< css::util::XNumberFormatTypes >& _xTypes, const css::lang::Locale& _rLocale);
// calculates the default numberformat for a given datatype and a give language // @param _nDataType @see com.sun.star.sdbc.DataType // @param _nScale can be zero
OOO_DLLPUBLIC_DBTOOLS
sal_Int32 getDefaultNumberFormat(sal_Int32 _nDataType,
sal_Int32 _nScale, bool _bIsCurrency, const css::uno::Reference< css::util::XNumberFormatTypes >& _xTypes, const css::lang::Locale& _rLocale);
/** creates a connection which can be used for the rowset given
/** determines whether the given component is part of a document which is an embedded database document(suchasaform)
*/
OOO_DLLPUBLIC_DBTOOLS bool isEmbeddedInDatabase( const css::uno::Reference< css::uno::XInterface >& _rxComponent,
css::uno::Reference< css::sdbc::XConnection >& _rxActualConnection
);
/** returns the columns of the named table of the given connection
*/
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess> getTableFields( const css::uno::Reference< css::sdbc::XConnection>& _rxConn, const OUString& _rName
);
/** returns the primary key columns of the table
*/
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess> getPrimaryKeyColumns_throw( const css::uno::Any& i_aTable
);
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::container::XNameAccess> getPrimaryKeyColumns_throw( const css::uno::Reference< css::beans::XPropertySet >& i_xTable
);
/** get fields for a result set given by a "command descriptor"
/** create a new css::sdbc::SQLContext, fill it with the given descriptions and the given source, and<i>append</i>_rException(i.e.putitintotheNextExceptionmemberoftheSQLContext).
*/
OOO_DLLPUBLIC_DBTOOLS
css::sdbc::SQLException prependErrorInfo( const css::sdbc::SQLException& _rChainedException, const css::uno::Reference< css::uno::XInterface >& _rxContext, const OUString& _rAdditionalError, const StandardSQLState _eSQLState = StandardSQLState::ERROR_UNSPECIFIED);
/** search the parent hierarchy for a data source.
*/
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XDataSource> findDataSource(const css::uno::Reference< css::uno::XInterface >& _xParent);
/** determines the value of a boolean data source setting, given by ASCII name
/** check if a specific property is enabled in the info sequence @deprecated UsegetBooleanDataSourceSettinginstead,whichcaresforthedefaultofthepropertyitself, insteadofspreadingthisknowledgethroughallcallers.
*/
OOO_DLLPUBLIC_DBTOOLS bool isDataSourcePropertyEnabled(const css::uno::Reference< css::uno::XInterface>& _xProp, const OUString& _sProperty, bool _bDefault);
/** retrieves a particular indirect data source setting
/** quote the given name with the given quote string.
*/
OOO_DLLPUBLIC_DBTOOLS OUString quoteName(std::u16string_view _rQuote, const OUString& _rName);
/** quote the given table name (which may contain a catalog and a schema) according to the rules provided by the meta data
*/
OOO_DLLPUBLIC_DBTOOLS
OUString quoteTableName(const css::uno::Reference< css::sdbc::XDatabaseMetaData>& _rxMeta
, const OUString& _rName
,EComposeRule _eComposeRule);
/** split a fully qualified table name (including catalog and schema, if applicable) into its component parts. @param_rxConnMetaDatametadatadescribingtheconnectionwhereyougotthetablenamefrom @param_rQualifiedNamefullyqualifiedtablename @param_rCatalog(outparameter)uponreturn,containsthecatalogname @param_rSchema(outparameter)uponreturn,containstheschemaname @param_rName(outparameter)uponreturn,containsthetablename @param_eComposeRulewheredoyouneedthenamefor
*/
OOO_DLLPUBLIC_DBTOOLS void qualifiedNameComponents(const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rxConnMetaData, const OUString& _rQualifiedName, OUString& _rCatalog, OUString& _rSchema, OUString& _rName,EComposeRule _eComposeRule);
/** calculate a NumberFormatsSupplier for use with a given connection @param_rxConntheconnectionforwhichtheformatterisrequested @param_bAllowDefaultiftheconnection(andrelatedcomponents,suchasitsparent)cannotsupply aformatter,wecanasktheDatabaseEnvironmentforadefaultone.Thisparameter statesifthisisallowed. @param_rxFactoryrequired(onlyof_bAllowDefaultissal_True)forcreatingtheDatabaseEnvironment. @returntheformatterallobjectrelatedtothegivenconnectionshouldworkwith.
*/
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::util::XNumberFormatsSupplier> getNumberFormats( const css::uno::Reference< css::sdbc::XConnection>& _rxConn, bool _bAllowDefault = false, const css::uno::Reference< css::uno::XComponentContext>& _rxContext = css::uno::Reference< css::uno::XComponentContext>()
);
/** create a css::sdb::XSingleSelectQueryComposer which represents thecurrentsettings(Command/CommandType/Filter/Order)ofthegivenrowset.
/** transfer and translate properties between two FormComponents @param_rxOldthesourcepropertyset @param_rxNewthedestinationpropertyset @param_rLocalethelocaleforconvertingnumberrelatedproperties
*/
OOO_DLLPUBLIC_DBTOOLS void TransferFormComponentProperties( const css::uno::Reference< css::beans::XPropertySet>& _rxOld, const css::uno::Reference< css::beans::XPropertySet>& _rxNew, const css::lang::Locale& _rLocale
);
/** check if the property "Privileges" supports css::sdbcx::Privilege::INSERT @param_rxCursorSetthepropertyset
*/
OOO_DLLPUBLIC_DBTOOLS bool canInsert(const css::uno::Reference< css::beans::XPropertySet>& _rxCursorSet); /** check if the property "Privileges" supports css::sdbcx::Privilege::UPDATE @param_rxCursorSetthepropertyset
*/
OOO_DLLPUBLIC_DBTOOLS bool canUpdate(const css::uno::Reference< css::beans::XPropertySet>& _rxCursorSet); /** check if the property "Privileges" supports css::sdbcx::Privilege::DELETE @param_rxCursorSetthepropertyset
*/
OOO_DLLPUBLIC_DBTOOLS bool canDelete(const css::uno::Reference< css::beans::XPropertySet>& _rxCursorSet);
/** compose a complete table name from its up to three parts, regarding to the database meta data composing rules
*/
OOO_DLLPUBLIC_DBTOOLS OUString composeTableName( const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rxMetaData, const OUString& _rCatalog, const OUString& _rSchema, const OUString& _rName, bool _bQuote,
EComposeRule _eComposeRule);
/** composes a table name for usage in a SELECT statement
/** compose the table name out of the property set which must support the properties from the service <member scope= "css::sdbcx">table</member> @param_xMetaData Themetadatafromtheconnection. @param_xTable Thetable.
*/
OOO_DLLPUBLIC_DBTOOLS OUString composeTableName( const css::uno::Reference< css::sdbc::XDatabaseMetaData>& _xMetaData, const css::uno::Reference< css::beans::XPropertySet>& _xTable,
EComposeRule _eComposeRule, bool _bQuote);
OOO_DLLPUBLIC_DBTOOLS sal_Int32 getSearchColumnFlag( const css::uno::Reference< css::sdbc::XConnection>& _rxConn,
sal_Int32 _nDataType); // return the datasource for the given datasource name
OOO_DLLPUBLIC_DBTOOLS css::uno::Reference< css::sdbc::XDataSource> getDataSource(const OUString& _rsDataSourceName, const css::uno::Reference< css::uno::XComponentContext>& _rxContext);
/** search for a name that is NOT in the NameAcces @param_rxContainer theNameAccesscontainertosearchin @param_rBaseName thebasenamethatshouldbeusedtocreatethenewname @param_bStartWithNumber When<TRUE/>thenameendswithnumberevenwhenthenameitselfdoesn'toccurinthecollection. @return Anamewhichdoesn'texistinthecollection.
*/
OOO_DLLPUBLIC_DBTOOLS
OUString createUniqueName(const css::uno::Reference< css::container::XNameAccess>& _rxContainer, const OUString& _rBaseName, bool _bStartWithNumber = true);
/** creates a unique name which is not already used in the given name array
*/
OOO_DLLPUBLIC_DBTOOLS OUString createUniqueName( const css::uno::Sequence< OUString >& _rNames, const OUString& _rBaseName, bool _bStartWithNumber
);
/** create a name which is a valid SQL 92 identifier name @param_rNamethestringwhichshouldbeconverted @param_rSpecials@seecom.sun.star.sdbc.XDatabaseMetaData.getExtraNameCharacters
/** creates the standard sql create table statement without the key part. @paramdescriptor Thedescriptorofthenewtable. @param_xConnection Theconnection. @param_bAddScale Thescalewillalsobeaddedwhenthevalueis0.
*/
OOO_DLLPUBLIC_DBTOOLS
OUString createStandardCreateStatement( const css::uno::Reference< css::beans::XPropertySet >& descriptor, const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
ISQLStatementHelper* _pHelper,
std::u16string_view _sCreatePattern);
/** creates the standard sql statement for the key part of a create table statement. @paramdescriptor Thedescriptorofthenewtable. @param_xConnection Theconnection.
*/
OOO_DLLPUBLIC_DBTOOLS
OUString createStandardKeyStatement( const css::uno::Reference< css::beans::XPropertySet >& descriptor, const css::uno::Reference< css::sdbc::XConnection>& _xConnection);
/** creates the standard sql statement for the type part of a create or alter table statement. @param_pHelper AllowtoaddspecialSQLconstructs. @paramdescriptor Thedescriptorofthecolumn. @param_xConnection Theconnection.
*/
OOO_DLLPUBLIC_DBTOOLS
OUString createStandardTypePart( const css::uno::Reference< css::beans::XPropertySet >& descriptor
,const css::uno::Reference< css::sdbc::XConnection>& _xConnection
,std::u16string_view _sCreatePattern = {});
/** creates the standard sql statement for the column part of a create table statement. @param_pHelper AllowtoaddspecialSQLconstructs. @paramdescriptor Thedescriptorofthecolumn. @param_xConnection Theconnection. @param_pHelper AllowtoaddspecialSQLconstructs.
*/
OOO_DLLPUBLIC_DBTOOLS
OUString createStandardColumnPart( const css::uno::Reference< css::beans::XPropertySet >& descriptor
,const css::uno::Reference< css::sdbc::XConnection>& _xConnection
,ISQLStatementHelper* _pHelper = nullptr
,std::u16string_view _sCreatePattern = {});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.