//
-// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/app/data_controls.htm">Data Controls</a>.
*
* @see Tizen::App::AppManager
+ *
+ * @code
+ *
+ * #include <FBase.h>
+ * #include <FIo.h>
+ *
+ * using namespace Tizen::Base;
+ * using namespace Tizen::Io;
+ *
+ * class MySqlDataControlResponseListener:
+ * : public Tizen::App::ISqlDataControlResponseListener
+ * {
+ * public:
+ * void OnSqlDataControlInsertResponseReceived(RequestId reqId, const String& providerId, const String& dataId, long long insertRowId, bool providerResult, const String* pErrorMsg)
+ * {
+ * AppLog("Row Id = %d", insertRowId);
+ * }
+ * };
+ *
+ * void
+ * MyClass::Execute(void)
+ * {
+ * String providerId(L"http://tizen.org/datacontrol/provider/example");
+ * SqlDataControl* pDc = AppManager::GetSqlDataControlN(providerId);
+ *
+ * MySqlDataControlResponseListener* pResponseListener = new MySqlDataControlResponseListener();
+ *
+ * pDc->SetSqlDataControlResponseListener(pResponseListener);
+ *
+ * String dataId(L"test");
+ * String person(L"person");
+ * String number(L"number");
+ * RequestId reqId;
+ *
+ * ArrayList columnList(SingleObjectDeleter);
+ * columnList.Construct();
+ *
+ * columnList.Add(person);
+ * columnList.Add(number);
+ *
+ * String where(L"group = 'friend'");
+ * String order(L"person ASC");
+ *
+ * pDc->Select(dataId, &columnList, &where, &order, reqId);
+ * }
+ *
+ * @endcode
+
*/
class _OSP_EXPORT_ SqlDataControl
* @exception E_ILLEGAL_ACCESS Either of the following conditions has occurred: @n
* - Access is denied due to insufficient permission.
* - The application using this method is not signed with the same certificate of provider application. @b Since: @b 2.1
- * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred:
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @remarks If the value specified in the @c pWhere is string, the value must be wrapped in
* single quotes. Otherwise it is not needed to wrap the numeric value in single quotes.
* For more information on the SQL statement, see SQLite SQL documents.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 16KB size.
*/
result Select(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IList* pColumnList,
const Tizen::Base::String* pWhere, const Tizen::Base::String *pOrder, RequestId& reqId,
* @exception E_ILLEGAL_ACCESS Either of the following conditions has occurred: @n
* - Access is denied due to insufficient permission.
* - The application using this method is not signed with the same certificate of provider application. @b Since: @b 2.1
- * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred:
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @remarks If the value specified in the @c insertMap is string, the value must be wrapped in
* single quotes. Otherwise it is not needed to wrap the numeric value in single quotes.
* For more information on the SQL statement, see SQLite SQL documents.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 1MB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 1MB size.
*/
result Insert(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IMap& insertMap, RequestId& reqId);
* The string consists of one or more components, separated by a slash('/').
* @param[in] updateMap The column-value pairs to update @n
* The type of objects contained in the specified @c updateMap must be
- * Tizen::Base::String class. @n
+ * Tizen::Base::String class.
* @param[in] pWhere A filter to select desired rows to update @n
* It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as
* column1 = 'stringValue' AND column2 = numericValue.
* @exception E_ILLEGAL_ACCESS Either of the following conditions has occurred: @n
* - Access is denied due to insufficient permission.
* - The application using this method is not signed with the same certificate of provider application. @b Since: @b 2.1
- * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred:
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @remarks If the value specified in the @c pWhere or @c updateMap is string, the value must be wrapped in
* single quotes. Otherwise it is not needed to wrap the numeric value in single quotes.
* For more information on the SQL statement, see SQLITE SQL documents.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 1MB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 1MB size.
*/
result Update(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IMap& updateMap,
const Tizen::Base::String* pWhere, RequestId& reqId);
* @exception E_ILLEGAL_ACCESS Either of the following conditions has occurred: @n
* - Access is denied due to insufficient permission.
* - The application using this method is not signed with the same certificate of provider application. @b Since: @b 2.1
- * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred:
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @remarks If the value specified in the @c pWhere is string, the value must be wrapped in
* single quotes. Otherwise it is not needed to wrap the numeric value in single quotes.
* For more information on the SQL statement, see SQLITE SQL documents.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 16KB size.
*/
result Delete(const Tizen::Base::String& dataId, const Tizen::Base::String* pWhere, RequestId& reqId);