cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/5] git commit: Update storage.c
Date Thu, 12 Jun 2014 01:28:19 GMT
Repository: cordova-windows
Updated Branches:
  refs/heads/Win32 [created] 6bc628468


Update storage.c

Append processing in case the value type of the data is double.

Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/12bbf534
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/12bbf534
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/12bbf534

Branch: refs/heads/Win32
Commit: 12bbf534bf874e4b572affa20b4dcc0b406593b7
Parents: 113565b
Author: Tanaka Yusuke <social@tnksoft.com>
Authored: Wed Sep 25 16:34:14 2013 +0900
Committer: Tanaka Yusuke <social@tnksoft.com>
Committed: Wed Sep 25 16:34:14 2013 +0900

----------------------------------------------------------------------
 windows7/Cordova/storage.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/12bbf534/windows7/Cordova/storage.c
----------------------------------------------------------------------
diff --git a/windows7/Cordova/storage.c b/windows7/Cordova/storage.c
index f723132..712d35e 100644
--- a/windows7/Cordova/storage.c
+++ b/windows7/Cordova/storage.c
@@ -312,6 +312,10 @@ static HRESULT execute_sql(BSTR callback_id, BSTR args)
 						static wchar_t number[20];
 						swprintf(number, 19, L"%d", sqlite3_column_int(stmt, j));
 						text_buf_append(response, number);
+					} else if(sqlite3_column_type(stmt, j) == SQLITE_FLOAT){
+						static wchar_t number[50];
+						swprintf(number, 49, L"%f", sqlite3_column_double(stmt, j));
+						text_buf_append(response, number);						
 					} else if (sqlite3_column_type(stmt, j) == SQLITE_TEXT) {
 						text_buf_append(response, L"\"");
 						text_buf_append(response, (wchar_t *) sqlite3_column_text16(stmt, j));
@@ -381,4 +385,4 @@ void storage_close(void)
 	}
 }
 
-DEFINE_CORDOVA_MODULE(Storage, L"Storage", storage_exec, NULL, storage_close)
\ No newline at end of file
+DEFINE_CORDOVA_MODULE(Storage, L"Storage", storage_exec, NULL, storage_close)


Mime
View raw message