rhodes 1.5.5 → 2.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/Manifest.txt +214 -32
- data/Rakefile +33 -10
- data/bin/upgrade-rhodes-app +0 -1
- data/lib/build/compileERB/bb.rb +2 -2
- data/lib/build/compileERB/default.rb +7 -5
- data/lib/build/jake.rb +1 -1
- data/lib/extensions/digest-md5/ext.yml +1 -1
- data/lib/extensions/digest-md5/ext/Rakefile +35 -36
- data/lib/extensions/digest-md5/ext/build.bat +1 -0
- data/lib/extensions/digest-md5/ext/digest-md5.vcproj +203 -0
- data/lib/extensions/digest-sha1/ext.yml +1 -1
- data/lib/extensions/digest/ext.yml +1 -1
- data/lib/extensions/digest/ext/Rakefile +35 -39
- data/lib/extensions/digest/ext/build.bat +1 -2
- data/lib/extensions/digest/ext/digest.vcproj +203 -0
- data/lib/framework/rho/render.rb +79 -22
- data/lib/framework/rho/rho.rb +294 -56
- data/lib/framework/rho/rhoapplication.rb +10 -0
- data/lib/framework/rho/rhofsconnector.rb +2 -6
- data/lib/framework/rho/rhoutils.rb +56 -14
- data/lib/framework/rho/rhoviewhelpers.rb +2 -0
- data/lib/framework/rhodes.rb +2 -2
- data/lib/framework/rhom/rhom.rb +42 -15
- data/lib/framework/rhom/rhom_db_adapter.rb +165 -159
- data/lib/framework/rhom/rhom_object.rb +0 -1
- data/lib/framework/rhom/rhom_object_factory.rb +343 -166
- data/lib/framework/rhom/rhom_source.rb +28 -15
- data/lib/framework/version.rb +2 -2
- data/lib/rhodes.rb +2 -2
- data/platform/android/Rhodes/AndroidManifest.xml +2 -2
- data/platform/android/Rhodes/gen/com/rhomobile/rhodes/R.java +39 -44
- data/platform/android/Rhodes/jni/include/JNIRhodes.h +1 -1
- data/platform/android/Rhodes/jni/include/details/rhojava.inc +23 -20
- data/platform/android/Rhodes/jni/include/jni/com_rhomobile_rhodes_RhoMenu.h +61 -0
- data/platform/android/Rhodes/jni/include/jni/com_rhomobile_rhodes_Rhodes.h +16 -0
- data/platform/android/Rhodes/jni/include/jni/com_rhomobile_rhodes_alert_Alert.h +21 -0
- data/platform/android/Rhodes/jni/include/sslimpl.h +1 -1
- data/platform/android/Rhodes/jni/src/alert.cpp +32 -5
- data/platform/android/Rhodes/jni/src/callbacks.cpp +51 -21
- data/platform/android/Rhodes/jni/src/mapview.cpp +3 -8
- data/platform/android/Rhodes/jni/src/menu.cpp +70 -0
- data/platform/android/Rhodes/jni/src/navbar.cpp +16 -0
- data/platform/android/Rhodes/jni/src/rhodes.cpp +37 -0
- data/platform/android/Rhodes/jni/src/sslimpl.cpp +3 -3
- data/platform/android/Rhodes/jni/src/webview.cpp +21 -7
- data/platform/android/Rhodes/res/drawable/alert_alert.png +0 -0
- data/platform/android/Rhodes/res/drawable/alert_info.png +0 -0
- data/platform/android/Rhodes/res/drawable/alert_question.png +0 -0
- data/platform/android/Rhodes/res/drawable/camera.png +0 -0
- data/platform/android/Rhodes/res/layout/camera.xml +18 -3
- data/platform/android/Rhodes/res/menu/options.xml +0 -10
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/AndroidR.java +5 -10
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Capabilities.java +12 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhoMenu.java +105 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/Rhodes.java +157 -122
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/SplashScreen.java +7 -58
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/WebView.java +16 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java +220 -17
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/Camera.java +22 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/camera/ImageCapture.java +44 -25
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/geolocation/GeoLocation.java +10 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/MainView.java +3 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +10 -21
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/TabbedMainView.java +15 -12
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/phonebook/Phonebook.java +44 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/socket/SSLImpl.java +47 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/MailUriHandler.java +13 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/TelUriHandler.java +11 -5
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/UriHandler.java +1 -4
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/uri/VideoUriHandler.java +61 -0
- data/platform/android/build/RhodesSRC_build.files +3 -0
- data/platform/android/build/android.rake +173 -60
- data/platform/android/build/androidcommon.rb +1 -2
- data/platform/android/build/librhocommon_build.files +5 -0
- data/platform/android/build/librhodes_build.files +2 -0
- data/platform/android/build/libruby_build.files +2 -1
- data/platform/bb/Hsqldb/Hsqldb.jdp +0 -3
- data/platform/bb/Hsqldb/src/com/rho/db/FileUtilBB.java +1 -1
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBResult.java +16 -1
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBRowResult.java +5 -0
- data/platform/bb/Hsqldb/src/com/rho/db/HsqlDBStorage.java +25 -4
- data/platform/bb/Hsqldb/src/com/rho/db/Journal.java +1 -1
- data/platform/bb/Hsqldb/src/com/rho/file/FileAccessBB.java +0 -1
- data/platform/bb/Hsqldb/src/j2me/math/Number.java +6 -3
- data/platform/bb/Hsqldb/src/org/hsqldb/CompiledStatementExecutor.java +2 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/Expression.java +1 -0
- data/platform/bb/Hsqldb/src/org/hsqldb/Parser.java +1 -0
- data/platform/bb/Hsqldb/src/org/hsqldb/Result.java +2 -0
- data/platform/bb/Hsqldb/src/org/hsqldb/Select.java +12 -6
- data/platform/bb/Hsqldb/src/org/hsqldb/Session.java +19 -12
- data/platform/bb/Hsqldb/src/org/hsqldb/Table.java +10 -4
- data/platform/bb/Hsqldb/src/org/hsqldb/Token.java +10 -2
- data/platform/bb/Hsqldb/src/org/hsqldb/Tokenizer.java +3 -3
- data/platform/bb/Hsqldb/src/org/hsqldb/lib/java/JavaSystem.java +1 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/persist/HsqlProperties.java +2 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/persist/ScaledRAFile.java +1 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/scriptio/ScriptReaderText.java +1 -1
- data/platform/bb/Hsqldb/src/org/hsqldb/scriptio/ScriptWriterBase.java +1 -1
- data/platform/bb/RubyVM/RubyVM.jdp +9 -10
- data/platform/bb/build/RubyVM_build.files +9 -7
- data/platform/bb/build/bb.rake +13 -3
- data/platform/bb/build/hsqldb_build.files +0 -2
- data/platform/bb/build/rhodes_build.files +5 -2
- data/platform/bb/rhodes/platform/4.7/com/rho/RhoMainScreen.java +8 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/BrowserAdapter5.java +154 -0
- data/platform/bb/rhodes/platform/5.0/com/rho/RhoMainScreen.java +8 -0
- data/platform/bb/rhodes/platform/common/com/rho/BrowserAdapter5.java +28 -0
- data/platform/bb/rhodes/rhodes.jdp +12 -7
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter.java +331 -0
- data/platform/bb/rhodes/src/com/rho/BrowserAdapter5.java +28 -0
- data/platform/bb/rhodes/src/com/rho/IBrowserAdapter.java +10 -0
- data/platform/bb/rhodes/src/com/rho/RhoMainScreen.java +4 -0
- data/platform/bb/rhodes/src/com/rho/RhoRubyHelper.java +2 -4
- data/platform/bb/rhodes/src/com/rho/{Jsr75File.java → file/Jsr75File.java} +83 -36
- data/platform/bb/{Hsqldb → rhodes}/src/com/rho/file/Jsr75RAFileImpl.java +0 -1
- data/platform/bb/{Hsqldb → rhodes}/src/com/rho/file/PersistRAFileImpl.java +0 -2
- data/platform/bb/rhodes/src/com/rho/net/NetworkAccess.java +8 -10
- data/platform/bb/rhodes/src/com/rho/rubyext/Alert.java +1 -1
- data/platform/bb/rhodes/src/com/rho/rubyext/GeoLocation.java +39 -0
- data/platform/bb/rhodes/src/com/rho/rubyext/System.java +63 -2
- data/platform/bb/rhodes/src/com/rho/rubyext/WebView.java +100 -0
- data/platform/bb/rhodes/src/rhomobile/LogScreen.java +1 -1
- data/platform/bb/rhodes/src/rhomobile/PushListeningThread.java +13 -1
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +138 -492
- data/platform/bb/rhodes/src/rhomobile/SecondaryResourceFetchThread.java +11 -2
- data/platform/bb/rhodes/src/rhomobile/Utilities.java +14 -10
- data/platform/bb/rhodes/src/rhomobile/camera/CameraScreen.java +5 -14
- data/platform/bb/rhodes/src/rhomobile/camera/ImageBrowserScreen.java +1 -1
- data/platform/bb/rhodes/src/rhomobile/mapview/GoogleMapField.java +2 -2
- data/platform/iphone/Classes/AppManager/AppManager.m +37 -14
- data/platform/iphone/Classes/Camera/PickImageDelegate.h +15 -4
- data/platform/iphone/Classes/Camera/PickImageDelegate.m +53 -50
- data/platform/iphone/Classes/DateTimePicker.h +17 -0
- data/platform/iphone/Classes/DateTimePicker.m +35 -0
- data/platform/iphone/Classes/GeoLocation/LocationController.m +2 -3
- data/platform/iphone/Classes/LogOptionsController.m +3 -2
- data/platform/iphone/Classes/LogViewController.m +4 -2
- data/platform/iphone/Classes/MapView/GoogleGeocoder.m +12 -20
- data/platform/iphone/Classes/MapView/MapAnnotation.h +9 -13
- data/platform/iphone/Classes/MapView/MapAnnotation.m +17 -65
- data/platform/iphone/Classes/MapView/MapViewController.h +1 -7
- data/platform/iphone/Classes/MapView/MapViewController.m +51 -25
- data/platform/iphone/Classes/NativeBar.h +0 -12
- data/platform/iphone/Classes/NativeBar.m +121 -2
- data/platform/iphone/Classes/NavBar.h +16 -0
- data/platform/iphone/Classes/NavBar.m +115 -0
- data/platform/iphone/Classes/RhoAlert.h +19 -0
- data/platform/iphone/Classes/RhoAlert.m +258 -0
- data/platform/iphone/Classes/RhoDelegate.m +1 -0
- data/platform/iphone/Classes/RhoMainView.h +33 -0
- data/platform/iphone/Classes/Rhodes.h +56 -0
- data/platform/iphone/Classes/Rhodes.m +533 -0
- data/platform/iphone/Classes/RingtoneManager.h +17 -0
- data/platform/iphone/Classes/RingtoneManager.m +73 -0
- data/platform/iphone/Classes/SimpleMainView.h +30 -0
- data/platform/iphone/Classes/SimpleMainView.m +380 -0
- data/platform/iphone/Classes/TabbedMainView.h +24 -0
- data/platform/iphone/Classes/TabbedMainView.m +202 -0
- data/platform/iphone/Classes/WebView.m +123 -0
- data/platform/iphone/Classes/rho/net/NetRequestImpl.m +2 -2
- data/platform/iphone/Classes/rho/net/sslimpl.cpp +13 -1
- data/platform/iphone/Classes/rho/net/sslimpl.h +1 -1
- data/platform/iphone/Info.plist +1 -1
- data/platform/iphone/RhoLib/RhoLib.xcodeproj/project.pbxproj +44 -0
- data/platform/iphone/main.m +1 -2
- data/platform/iphone/rbuild/iphone.rake +8 -16
- data/platform/iphone/rhoextlib/dosyscall.c +1 -1
- data/platform/iphone/rhoextlib/rhoextlib.xcodeproj/project.pbxproj +6 -4
- data/platform/iphone/rhorubylib/rhorubylib.xcodeproj/project.pbxproj +12 -0
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +97 -62
- data/platform/iphone/rhosynclib/rhosynclib.xcodeproj/project.pbxproj +12 -0
- data/platform/osx/Rhodes Launcher/launch.rb +14 -21
- data/platform/shared/common/AppMenu.cpp +122 -0
- data/platform/shared/common/AppMenu.h +46 -0
- data/platform/shared/common/PosixThreadImpl.cpp +1 -1
- data/platform/shared/common/RhoConf.cpp +27 -2
- data/platform/shared/common/RhoConf.h +5 -0
- data/platform/shared/common/RhoFilePath.h +21 -0
- data/platform/shared/common/RhoStd.h +44 -5
- data/platform/shared/common/RhoTime.h +20 -7
- data/platform/shared/common/RhodesApp.cpp +236 -177
- data/platform/shared/common/RhodesApp.h +36 -13
- data/platform/shared/common/SplashScreen.cpp +2 -2
- data/platform/shared/common/StringConverter.h +10 -11
- data/platform/shared/common/rhoparams.c +0 -6
- data/platform/shared/curl/lib/rhossl.c +3 -2
- data/platform/shared/curl/lib/url.c +0 -5
- data/platform/shared/db/DBAdapter.cpp +304 -81
- data/platform/shared/db/DBAdapter.h +24 -7
- data/platform/shared/db/DBAttrManager.cpp +83 -30
- data/platform/shared/db/DBAttrManager.h +6 -0
- data/platform/shared/db/DBResult.h +15 -4
- data/platform/shared/json/JSONIterator.cpp +100 -3
- data/platform/shared/json/JSONIterator.h +28 -3
- data/platform/shared/net/AsyncHttp.cpp +25 -22
- data/platform/shared/net/AsyncHttp.h +10 -6
- data/platform/shared/net/CURLNetRequest.cpp +115 -36
- data/platform/shared/net/CURLNetRequest.h +6 -0
- data/platform/shared/net/HttpServer.cpp +6 -4
- data/platform/shared/net/HttpServer.h +0 -1
- data/platform/shared/net/INetRequest.h +19 -3
- data/platform/shared/net/URI.cpp +2 -2
- data/platform/shared/net/ssl.cpp +2 -2
- data/platform/shared/net/ssl.h +2 -2
- data/platform/shared/ruby/ext/alert/alert.i +14 -2
- data/platform/shared/ruby/ext/alert/alert_wrap.c +40 -20
- data/platform/shared/ruby/ext/asynchttp/asynchttp.i +8 -8
- data/platform/shared/ruby/ext/asynchttp/asynchttp_wrap.c +112 -16
- data/platform/shared/ruby/ext/geolocation/geolocation.i +16 -12
- data/platform/shared/ruby/ext/geolocation/geolocation_wrap.c +481 -125
- data/platform/shared/ruby/ext/navbar/navbar.i +20 -0
- data/platform/shared/ruby/ext/navbar/navbar_wrap.c +1859 -0
- data/platform/shared/ruby/ext/rho/extensions.c +1 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +32 -2
- data/platform/shared/ruby/ext/rho/rhoruby.h +7 -2
- data/platform/shared/ruby/ext/rhoconf/rhoconf.i +4 -0
- data/platform/shared/ruby/ext/rhoconf/rhoconf_wrap.c +31 -0
- data/platform/shared/ruby/ext/sqlite3_api/sqlite3_api_wrap.c +188 -3226
- data/platform/shared/ruby/ext/syncengine/syncengine.i +14 -25
- data/platform/shared/ruby/ext/syncengine/syncengine_wrap.c +96 -104
- data/platform/shared/ruby/ext/system/system.i +12 -0
- data/platform/shared/ruby/ext/system/system_wrap.c +101 -7
- data/platform/shared/ruby/ext/webview/webview.i +20 -15
- data/platform/shared/ruby/ext/webview/webview_wrap.c +42 -16
- data/platform/shared/ruby/thread_pthread.c +4 -4
- data/platform/shared/ruby/thread_win32.c +4 -4
- data/platform/shared/ruby/wince/io_wce.c +0 -1
- data/platform/shared/rubyJVM/src/com/rho/FilePath.java +18 -2
- data/platform/shared/rubyJVM/src/com/rho/IRhoRubyHelper.java +1 -0
- data/platform/shared/rubyJVM/src/com/rho/Properties.java +9 -0
- data/platform/shared/rubyJVM/src/com/rho/RhoClassFactory.java +2 -3
- data/platform/shared/rubyJVM/src/com/rho/RhoConf.java +47 -8
- data/platform/shared/rubyJVM/src/com/rho/RhoLogConf.java +1 -0
- data/platform/shared/rubyJVM/src/com/rho/RhoLogFileSink.java +1 -0
- data/platform/shared/rubyJVM/src/com/rho/RhoRuby.java +43 -5
- data/platform/shared/rubyJVM/src/com/rho/RhodesApp.java +98 -3
- data/platform/shared/rubyJVM/src/com/rho/db/DBAdapter.java +460 -175
- data/platform/shared/rubyJVM/src/com/rho/db/DBAttrManager.java +81 -33
- data/platform/shared/rubyJVM/src/com/rho/db/IDBCallback.java +3 -5
- data/platform/shared/rubyJVM/src/com/rho/db/IDBResult.java +2 -0
- data/platform/shared/rubyJVM/src/com/rho/db/IDBStorage.java +2 -0
- data/platform/shared/rubyJVM/src/com/rho/{IFile.java → file/IFile.java} +1 -1
- data/platform/shared/rubyJVM/src/com/rho/{IFileAccess.java → file/IFileAccess.java} +1 -1
- data/platform/shared/rubyJVM/src/com/rho/{IRAFile.java → file/IRAFile.java} +1 -1
- data/platform/{bb/Hsqldb/src/com/rho/db → shared/rubyJVM/src/com/rho/file}/RandomAccessFile.java +1 -2
- data/platform/shared/rubyJVM/src/com/rho/{SimpleFile.java → file/SimpleFile.java} +5 -1
- data/platform/shared/rubyJVM/src/com/rho/net/AsyncHttp.java +23 -18
- data/platform/shared/rubyJVM/src/com/rho/net/NetRequest.java +167 -250
- data/platform/shared/rubyJVM/src/com/rho/net/RhoConnection.java +100 -30
- data/platform/shared/rubyJVM/src/com/rho/net/URI.java +0 -1
- data/platform/shared/rubyJVM/src/com/rho/sync/ClientRegister.java +30 -33
- data/platform/shared/rubyJVM/src/com/rho/sync/ISyncProtocol.java +20 -0
- data/platform/shared/rubyJVM/src/com/rho/sync/JSONEntry.java +5 -0
- data/platform/shared/rubyJVM/src/com/rho/sync/JSONStructIterator.java +74 -0
- data/platform/shared/rubyJVM/src/com/rho/sync/SyncEngine.java +486 -257
- data/platform/shared/rubyJVM/src/com/rho/sync/SyncNotify.java +89 -58
- data/platform/shared/rubyJVM/src/com/rho/sync/SyncProtocol_3.java +79 -0
- data/platform/shared/rubyJVM/src/com/rho/sync/SyncSource.java +634 -495
- data/platform/shared/rubyJVM/src/com/rho/sync/SyncThread.java +74 -90
- data/platform/shared/rubyJVM/src/com/xruby/GeneratedMethods/RubySymbol_Methods.java +1 -0
- data/platform/shared/rubyJVM/src/com/xruby/runtime/builtin/RubyThread.java +6 -0
- data/platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubyRuntime.java +6 -2
- data/platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubySymbol.java +17 -1
- data/platform/shared/rubyJVM/src/com/xruby/runtime/lang/RubyValue.java +1 -0
- data/platform/shared/rubyJVM/src/org/json/me/JSONObject.java +3 -0
- data/platform/shared/rubyext/GeoLocation.cpp +23 -0
- data/platform/shared/rubyext/GeoLocation.h +2 -0
- data/platform/shared/rubyext/RhoRuby.cpp +31 -0
- data/platform/shared/rubyext/RhoRuby.h +32 -0
- data/platform/shared/rubyext/System.cpp +14 -3
- data/platform/shared/rubyext/WebView.h +21 -0
- data/platform/shared/sync/ClientRegister.cpp +23 -28
- data/platform/shared/sync/ClientRegister.h +6 -2
- data/platform/shared/sync/ISyncProtocol.h +29 -0
- data/platform/shared/sync/SyncEngine.cpp +450 -190
- data/platform/shared/sync/SyncEngine.h +28 -38
- data/platform/shared/sync/SyncNotify.cpp +43 -41
- data/platform/shared/sync/SyncNotify.h +7 -7
- data/platform/shared/sync/SyncProtocol_3.h +86 -0
- data/platform/shared/sync/SyncSource.cpp +535 -371
- data/platform/shared/sync/SyncSource.h +48 -55
- data/platform/shared/sync/SyncThread.cpp +59 -103
- data/platform/shared/sync/SyncThread.h +10 -23
- data/platform/shared/unzip/unzip.cpp +3 -2
- data/platform/shared/unzip/unzip.h +5 -1
- data/platform/shared/wtl80/include/atlapp.h +10 -10
- data/platform/wm/RhoLib/RhoLib.vcproj +32 -0
- data/platform/wm/build/build_inf.js +40 -3
- data/platform/wm/build/wm.rake +95 -9
- data/platform/wm/rhodes/Alert.cpp +4 -0
- data/platform/wm/rhodes/DateTimePicker.cpp +183 -0
- data/platform/wm/rhodes/DateTimePicker.h +100 -0
- data/platform/wm/rhodes/MainWindow.cpp +222 -209
- data/platform/wm/rhodes/MainWindow.h +28 -35
- data/platform/wm/rhodes/Rhodes.cpp +20 -60
- data/platform/wm/rhodes/Rhodes.rc +41 -7
- data/platform/wm/rhodes/Utils.cpp +65 -0
- data/platform/wm/rhodes/Utils.h +9 -0
- data/platform/wm/rhodes/camera/Camera.cpp +2 -2
- data/platform/wm/rhodes/menubar.cpp +2 -33
- data/platform/wm/rhodes/menubar.h +0 -14
- data/platform/wm/rhodes/resource.h +13 -11
- data/platform/wm/rhodes/rho/net/NetRequest.cpp +16 -35
- data/platform/wm/rhodes/rho/net/NetRequest.h +8 -2
- data/platform/wm/rhodes/rho/net/NetRequestImpl.cpp +264 -46
- data/platform/wm/rhodes/rho/net/NetRequestImpl.h +14 -4
- data/platform/wm/rhodes/rho/rubyext/GeoLocationImpl.cpp +1 -1
- data/platform/wm/rhodes/rho/rubyext/GeoLocationImpl.h +1 -1
- data/platform/wm/rhodes/rho/rubyext/SystemImpl.cpp +77 -4
- data/platform/wm/rhodes/rho/rubyext/WebView.cpp +63 -0
- data/platform/wm/rhodes/rhodes.vcproj +20 -66
- data/platform/wm/rhodes/stdafx.h +22 -0
- data/platform/wm/rubylib/rubylib.vcproj +4 -0
- data/platform/wm/syncengine/syncengine.vcproj +8 -0
- data/platform/wm/tools/detool.sln +66 -0
- data/platform/wm/tools/detool/DEMComInterface.tlb +0 -0
- data/platform/wm/tools/detool/ReadMe.txt +33 -0
- data/platform/wm/tools/detool/detool.cpp +559 -0
- data/platform/wm/tools/detool/detool.h +5 -0
- data/platform/wm/tools/detool/detool.vcproj +233 -0
- data/platform/wm/tools/detool/stdafx.cpp +8 -0
- data/platform/wm/tools/detool/stdafx.h +15 -0
- data/platform/wm/tools/detool/targetver.h +24 -0
- data/platform/wm/tools/rhosetup/ReadMe.txt +41 -0
- data/platform/wm/tools/rhosetup/rhosetup.cpp +52 -0
- data/platform/wm/tools/rhosetup/rhosetup.vcproj +641 -0
- data/platform/wm/tools/rhosetup/stdafx.cpp +8 -0
- data/platform/wm/tools/rhosetup/stdafx.h +59 -0
- data/rakefile.rb +33 -10
- data/res/build-tools/db/syncdb.schema +25 -23
- data/res/build-tools/db/syncdb.triggers +1 -1
- data/res/build-tools/detool.exe +0 -0
- data/res/build-tools/rhosetup.dll +0 -0
- data/res/generators/rhogen.rb +27 -22
- data/res/generators/templates/application/app/Settings/controller.rb +3 -1
- data/res/generators/templates/application/app/Settings/home.bb.erb +17 -0
- data/res/generators/templates/application/app/Settings/home.erb +21 -12
- data/res/generators/templates/application/app/Settings/index.bb.erb +32 -0
- data/res/generators/templates/application/app/Settings/index.erb +44 -15
- data/res/generators/templates/application/app/Settings/login.bb.erb +35 -0
- data/res/generators/templates/application/app/Settings/login.erb +29 -30
- data/res/generators/templates/application/app/Settings/reset.bb.erb +15 -0
- data/res/generators/templates/application/app/Settings/reset.erb +16 -13
- data/res/generators/templates/application/app/Settings/wait.bb.erb +3 -0
- data/res/generators/templates/application/app/Settings/wait.erb +4 -4
- data/res/generators/templates/application/app/application.rb +8 -0
- data/res/generators/templates/application/app/helpers/browser_helper.rb +13 -0
- data/res/generators/templates/application/app/index.bb.erb +26 -0
- data/res/generators/templates/application/app/index.erb +21 -12
- data/res/generators/templates/application/app/layout.erb +9 -11
- data/res/generators/templates/application/public/css/android.css +285 -0
- data/res/generators/templates/application/public/css/blackberry.css +85 -78
- data/res/generators/templates/application/public/css/iphone.css +286 -296
- data/res/generators/templates/application/public/css/webkit.css +34 -0
- data/res/generators/templates/application/public/css/windows_mobile.css +208 -0
- data/res/generators/templates/application/public/icons/Read me first - license.txt +14 -0
- data/res/generators/templates/application/public/icons/about.png +0 -0
- data/res/generators/templates/application/public/icons/airplane.png +0 -0
- data/res/generators/templates/application/public/icons/baby.png +0 -0
- data/res/generators/templates/application/public/icons/badge.png +0 -0
- data/res/generators/templates/application/public/icons/bandaid.png +0 -0
- data/res/generators/templates/application/public/icons/bar-chart.png +0 -0
- data/res/generators/templates/application/public/icons/battery.png +0 -0
- data/res/generators/templates/application/public/icons/beaker.png +0 -0
- data/res/generators/templates/application/public/icons/beaker2.png +0 -0
- data/res/generators/templates/application/public/icons/beermug.png +0 -0
- data/res/generators/templates/application/public/icons/bird.png +0 -0
- data/res/generators/templates/application/public/icons/book.png +0 -0
- data/res/generators/templates/application/public/icons/bookmark.png +0 -0
- data/res/generators/templates/application/public/icons/brightness.png +0 -0
- data/res/generators/templates/application/public/icons/bug.png +0 -0
- data/res/generators/templates/application/public/icons/cabinet.png +0 -0
- data/res/generators/templates/application/public/icons/calendar.png +0 -0
- data/res/generators/templates/application/public/icons/camera.png +0 -0
- data/res/generators/templates/application/public/icons/changeName.rb +22 -0
- data/res/generators/templates/application/public/icons/chat2.png +0 -0
- data/res/generators/templates/application/public/icons/chicken.png +0 -0
- data/res/generators/templates/application/public/icons/clock.png +0 -0
- data/res/generators/templates/application/public/icons/cloud.png +0 -0
- data/res/generators/templates/application/public/icons/coffee.png +0 -0
- data/res/generators/templates/application/public/icons/compass.png +0 -0
- data/res/generators/templates/application/public/icons/contrast.png +0 -0
- data/res/generators/templates/application/public/icons/dashboard.png +0 -0
- data/res/generators/templates/application/public/icons/display.png +0 -0
- data/res/generators/templates/application/public/icons/dogpaw.png +0 -0
- data/res/generators/templates/application/public/icons/download.png +0 -0
- data/res/generators/templates/application/public/icons/dumbbell.png +0 -0
- data/res/generators/templates/application/public/icons/ekg.png +0 -0
- data/res/generators/templates/application/public/icons/envelope.png +0 -0
- data/res/generators/templates/application/public/icons/equalizer.png +0 -0
- data/res/generators/templates/application/public/icons/eye.png +0 -0
- data/res/generators/templates/application/public/icons/film-roll.png +0 -0
- data/res/generators/templates/application/public/icons/flag.png +0 -0
- data/res/generators/templates/application/public/icons/fork-and-knife.png +0 -0
- data/res/generators/templates/application/public/icons/fuel.png +0 -0
- data/res/generators/templates/application/public/icons/gameplan.png +0 -0
- data/res/generators/templates/application/public/icons/gear.png +0 -0
- data/res/generators/templates/application/public/icons/gear2.png +0 -0
- data/res/generators/templates/application/public/icons/gift.png +0 -0
- data/res/generators/templates/application/public/icons/heart.png +0 -0
- data/res/generators/templates/application/public/icons/house.png +0 -0
- data/res/generators/templates/application/public/icons/inbox.png +0 -0
- data/res/generators/templates/application/public/icons/index-cards.png +0 -0
- data/res/generators/templates/application/public/icons/iphone.png +0 -0
- data/res/generators/templates/application/public/icons/ipod.png +0 -0
- data/res/generators/templates/application/public/icons/key.png +0 -0
- data/res/generators/templates/application/public/icons/lifebuoy.png +0 -0
- data/res/generators/templates/application/public/icons/lightbulb.png +0 -0
- data/res/generators/templates/application/public/icons/line-chart.png +0 -0
- data/res/generators/templates/application/public/icons/location.png +0 -0
- data/res/generators/templates/application/public/icons/lock.png +0 -0
- data/res/generators/templates/application/public/icons/loopback.png +0 -0
- data/res/generators/templates/application/public/icons/magnifying-glass.png +0 -0
- data/res/generators/templates/application/public/icons/map-marker.png +0 -0
- data/res/generators/templates/application/public/icons/map.png +0 -0
- data/res/generators/templates/application/public/icons/medical-bag.png +0 -0
- data/res/generators/templates/application/public/icons/medical.png +0 -0
- data/res/generators/templates/application/public/icons/microphone.png +0 -0
- data/res/generators/templates/application/public/icons/movie1.png +0 -0
- data/res/generators/templates/application/public/icons/movie2.png +0 -0
- data/res/generators/templates/application/public/icons/network.png +0 -0
- data/res/generators/templates/application/public/icons/note.png +0 -0
- data/res/generators/templates/application/public/icons/outlet.png +0 -0
- data/res/generators/templates/application/public/icons/palette.png +0 -0
- data/res/generators/templates/application/public/icons/paperclip.png +0 -0
- data/res/generators/templates/application/public/icons/phone.png +0 -0
- data/res/generators/templates/application/public/icons/photos.png +0 -0
- data/res/generators/templates/application/public/icons/piano.png +0 -0
- data/res/generators/templates/application/public/icons/picture-frame.png +0 -0
- data/res/generators/templates/application/public/icons/pill.png +0 -0
- data/res/generators/templates/application/public/icons/pin.png +0 -0
- data/res/generators/templates/application/public/icons/pinetree.png +0 -0
- data/res/generators/templates/application/public/icons/planet.png +0 -0
- data/res/generators/templates/application/public/icons/puzzle.png +0 -0
- data/res/generators/templates/application/public/icons/radar.png +0 -0
- data/res/generators/templates/application/public/icons/redo.png +0 -0
- data/res/generators/templates/application/public/icons/refresh.png +0 -0
- data/res/generators/templates/application/public/icons/runner.png +0 -0
- data/res/generators/templates/application/public/icons/shoebox.png +0 -0
- data/res/generators/templates/application/public/icons/shopping-bag.png +0 -0
- data/res/generators/templates/application/public/icons/shopping-cart.png +0 -0
- data/res/generators/templates/application/public/icons/shuffle.png +0 -0
- data/res/generators/templates/application/public/icons/signpost.png +0 -0
- data/res/generators/templates/application/public/icons/skull-n-crossbones.png +0 -0
- data/res/generators/templates/application/public/icons/skull.png +0 -0
- data/res/generators/templates/application/public/icons/sliders.png +0 -0
- data/res/generators/templates/application/public/icons/spraycan.png +0 -0
- data/res/generators/templates/application/public/icons/squiggle.png +0 -0
- data/res/generators/templates/application/public/icons/star.png +0 -0
- data/res/generators/templates/application/public/icons/stopwatch.png +0 -0
- data/res/generators/templates/application/public/icons/suitcase.png +0 -0
- data/res/generators/templates/application/public/icons/tag.png +0 -0
- data/res/generators/templates/application/public/icons/tags.png +0 -0
- data/res/generators/templates/application/public/icons/target.png +0 -0
- data/res/generators/templates/application/public/icons/testtube.png +0 -0
- data/res/generators/templates/application/public/icons/thermometer.png +0 -0
- data/res/generators/templates/application/public/icons/toolbox.png +0 -0
- data/res/generators/templates/application/public/icons/trophy.png +0 -0
- data/res/generators/templates/application/public/icons/tshirt.png +0 -0
- data/res/generators/templates/application/public/icons/tv.png +0 -0
- data/res/generators/templates/application/public/icons/umbrella.png +0 -0
- data/res/generators/templates/application/public/icons/walk.png +0 -0
- data/res/generators/templates/application/public/icons/weather.png +0 -0
- data/res/generators/templates/application/public/icons/widescreen.png +0 -0
- data/res/generators/templates/application/public/icons/wineglass.png +0 -0
- data/res/generators/templates/application/public/icons/zap.png +0 -0
- data/res/generators/templates/application/public/images/android/btn_check_off.png +0 -0
- data/res/generators/templates/application/public/images/android/btn_check_on.png +0 -0
- data/res/generators/templates/application/public/images/android/btn_radio_off.png +0 -0
- data/res/generators/templates/application/public/images/android/btn_radio_on.png +0 -0
- data/res/generators/templates/application/public/images/android/ic_menu_more.png +0 -0
- data/res/generators/templates/application/public/images/iphone/disclosure.png +0 -0
- data/res/generators/templates/application/public/images/iphone/disclosure_detail.png +0 -0
- data/res/generators/templates/application/public/images/iphone/radiobutton.png +0 -0
- data/res/generators/templates/application/public/images/iphone/select.png +0 -0
- data/res/generators/templates/application/public/images/iphone/switch.png +0 -0
- data/res/generators/templates/application/public/images/listArrow.png +0 -0
- data/res/generators/templates/application/public/images/listArrowDown.png +0 -0
- data/res/generators/templates/model/controller.rb +2 -0
- data/res/generators/templates/model/edit.bb.erb +24 -0
- data/res/generators/templates/model/edit.erb +21 -25
- data/res/generators/templates/model/index.bb.erb +21 -0
- data/res/generators/templates/model/index.erb +28 -14
- data/res/generators/templates/model/new.bb.erb +24 -0
- data/res/generators/templates/model/new.erb +20 -20
- data/res/generators/templates/model/show.bb.erb +21 -0
- data/res/generators/templates/model/show.erb +15 -15
- data/rhobuild.yml +37 -0
- data/rhodes.gemspec +1 -1
- data/spec/framework_spec/app/Account/config.rb +57 -1
- data/spec/framework_spec/app/Case/config.rb +1 -1
- data/spec/framework_spec/app/Customer/config.rb +1 -1
- data/spec/framework_spec/app/Product/config.rb +15 -1
- data/spec/framework_spec/app/spec/fixtures/object_values.txt +90 -90
- data/spec/framework_spec/app/spec/pagination/fixtures/object_values.txt +91 -91
- data/spec/framework_spec/app/spec/rho_spec.rb +1 -1
- data/spec/framework_spec/app/spec/rhom_object_spec.rb +47 -28
- data/spec/framework_spec/app/spec/rhom_spec.rb +8 -8
- data/spec/framework_spec/app/spec/spec_helper.rb +13 -5
- data/spec/framework_spec/app/spec_runner.rb +5 -4
- data/spec/framework_spec/public/css/base.css +0 -1
- data/spec/framework_spec/public/css/iphone.css +0 -1
- data/spec/framework_spec/rhoconfig.txt +3 -1
- metadata +220 -37
- data/platform/bb/rhodes/src/rhomobile/WebView.java +0 -90
- data/platform/iphone/Classes/BarItem.h +0 -27
- data/platform/iphone/Classes/BarItem.m +0 -32
- data/platform/iphone/Classes/JSString.h +0 -12
- data/platform/iphone/Classes/JSString.m +0 -7
- data/platform/iphone/Classes/RhoRunnerAppDelegate.h +0 -48
- data/platform/iphone/Classes/RhoRunnerAppDelegate.m +0 -617
- data/platform/iphone/Classes/Server/ServerHost.h +0 -81
- data/platform/iphone/Classes/Server/ServerHost.m +0 -597
- data/platform/iphone/Classes/Server/WebViewUrl.h +0 -13
- data/platform/iphone/Classes/Server/WebViewUrl.m +0 -8
- data/platform/iphone/Classes/TabBarDelegate.h +0 -39
- data/platform/iphone/Classes/TabBarDelegate.m +0 -151
- data/platform/iphone/Classes/Utils/unzip.cpp +0 -4328
- data/platform/iphone/Classes/Utils/unzip.h +0 -234
- data/platform/iphone/Classes/WebViewController.h +0 -59
- data/platform/iphone/Classes/WebViewController.m +0 -472
- data/platform/wm/rhodes/GetURLDialog.cpp +0 -64
- data/platform/wm/rhodes/GetURLDialog.h +0 -39
- data/res/generators/templates/application/public/css/base.css +0 -39
- data/res/generators/templates/application/public/css/rho.css +0 -3
- data/res/generators/templates/application/public/css/xhtml.css +0 -114
- data/spec/framework_spec/app/Question/config.rb +0 -3
- data/spec/generator_spec/source_generator_spec.rb +0 -27
@@ -26,10 +26,11 @@ platform/shared/ruby/ext/datetimepicker/datetimepicker_wrap.c
|
|
26
26
|
platform/shared/ruby/ext/geolocation/geolocation_wrap.c
|
27
27
|
platform/shared/ruby/ext/mapview/mapview_wrap.c
|
28
28
|
platform/shared/ruby/ext/nativebar/nativebar_wrap.c
|
29
|
+
platform/shared/ruby/ext/navbar/navbar_wrap.c
|
29
30
|
platform/shared/ruby/ext/phonebook/phonebook_wrap.c
|
31
|
+
platform/shared/ruby/ext/rho/extensions.c
|
30
32
|
platform/shared/ruby/ext/rho/rhoruby.c
|
31
33
|
platform/shared/ruby/ext/rho/rhosupport.c
|
32
|
-
platform/shared/ruby/ext/rho/extensions.c
|
33
34
|
platform/shared/ruby/ext/rhoconf/rhoconf_wrap.c
|
34
35
|
platform/shared/ruby/ext/ringtones/ringtones_wrap.c
|
35
36
|
platform/shared/ruby/ext/socket/socket.c
|
@@ -27,10 +27,7 @@ src\com\rho\db\HsqlDBResult.java
|
|
27
27
|
src\com\rho\db\HsqlDBRowResult.java
|
28
28
|
src\com\rho\db\HsqlDBStorage.java
|
29
29
|
src\com\rho\db\Journal.java
|
30
|
-
src\com\rho\db\RandomAccessFile.java
|
31
30
|
src\com\rho\file\FileAccessBB.java
|
32
|
-
src\com\rho\file\Jsr75RAFileImpl.java
|
33
|
-
src\com\rho\file\PersistRAFileImpl.java
|
34
31
|
src\j2me\io\BufferedOutputStream.java
|
35
32
|
src\j2me\io\FilterOutputStream.java
|
36
33
|
src\j2me\math\BigDecimal.java
|
@@ -33,7 +33,8 @@ public class HsqlDBResult implements IDBResult
|
|
33
33
|
m_result.getException() instanceof HsqlException )
|
34
34
|
{
|
35
35
|
HsqlException e = (HsqlException)m_result.getException();
|
36
|
-
return e.getErrorCode() == -Trace.VIOLATION_OF_UNIQUE_INDEX
|
36
|
+
return e.getErrorCode() == -Trace.VIOLATION_OF_UNIQUE_INDEX ||
|
37
|
+
e.getErrorCode() == -Trace.VIOLATION_OF_UNIQUE_CONSTRAINT;
|
37
38
|
}
|
38
39
|
|
39
40
|
return false;
|
@@ -51,6 +52,20 @@ public class HsqlDBResult implements IDBResult
|
|
51
52
|
//AS alias
|
52
53
|
return md.colNames[nCol];
|
53
54
|
}
|
55
|
+
|
56
|
+
public String getOrigColName(int nCol){
|
57
|
+
Result.ResultMetaData md = m_result.metaData;
|
58
|
+
if ( md.tableNames[nCol] != null && md.tableNames[nCol].length() > 0 )
|
59
|
+
{
|
60
|
+
if ( md.colOrigNames[nCol] != null )
|
61
|
+
return md.colOrigNames[nCol];
|
62
|
+
|
63
|
+
return md.colNames[nCol].toLowerCase();
|
64
|
+
}
|
65
|
+
|
66
|
+
//AS alias
|
67
|
+
return md.colNames[nCol];
|
68
|
+
}
|
54
69
|
|
55
70
|
public Result getResult(){
|
56
71
|
return m_result;
|
@@ -68,6 +68,18 @@ public class HsqlDBStorage implements IDBStorage, Session.IDBCallback{
|
|
68
68
|
}
|
69
69
|
}
|
70
70
|
|
71
|
+
public void executeBatchSQL(String strSqlScript)throws DBException
|
72
|
+
{
|
73
|
+
if ( m_dbSess == null )
|
74
|
+
throw new RuntimeException("executeSQL: m_dbSess == null");
|
75
|
+
|
76
|
+
Result res = m_dbSess.sqlExecuteDirectNoPreChecks(strSqlScript);
|
77
|
+
if ( res.getException() != null )
|
78
|
+
throw new DBException(res.getException());
|
79
|
+
|
80
|
+
m_dbSess.commitSchema();
|
81
|
+
}
|
82
|
+
|
71
83
|
/* static class HsqlDeleteTrigger implements org.hsqldb.Trigger {
|
72
84
|
|
73
85
|
public void fire(int i, String name, String table, Object[] row1,
|
@@ -77,21 +89,30 @@ public class HsqlDBStorage implements IDBStorage, Session.IDBCallback{
|
|
77
89
|
}
|
78
90
|
*/
|
79
91
|
//IDBCallback
|
80
|
-
public void
|
92
|
+
public void onBeforeDelete(Table table, Row row) {
|
81
93
|
if ( m_dbCallback == null )
|
82
94
|
return;
|
83
95
|
|
84
96
|
m_rowResult.init(table, row);
|
85
|
-
m_dbCallback.
|
97
|
+
m_dbCallback.onBeforeDelete(table.getName().name, m_rowResult );
|
86
98
|
}
|
87
99
|
|
88
|
-
public void
|
100
|
+
public void onAfterInsert(Table table, Row row) {
|
89
101
|
if ( m_dbCallback == null )
|
90
102
|
return;
|
91
103
|
|
92
104
|
m_rowResult.init(table, row);
|
93
|
-
m_dbCallback.
|
105
|
+
m_dbCallback.onAfterInsert(table.getName().name, m_rowResult );
|
94
106
|
}
|
107
|
+
|
108
|
+
public void onBeforeUpdate(Table table, Row row, int[] cols) {
|
109
|
+
if ( m_dbCallback == null )
|
110
|
+
return;
|
111
|
+
|
112
|
+
m_rowResult.init(table, row);
|
113
|
+
m_dbCallback.onBeforeUpdate(table.getName().name, m_rowResult, cols );
|
114
|
+
}
|
115
|
+
|
95
116
|
//IDBCallback
|
96
117
|
|
97
118
|
public void setDbCallback(IDBCallback callback)
|
@@ -21,7 +21,8 @@ public class Number{
|
|
21
21
|
else if ( obj instanceof Byte )
|
22
22
|
return ((Byte)obj).byteValue();
|
23
23
|
|
24
|
-
|
24
|
+
String strRes = obj.toString();
|
25
|
+
return strRes==null || strRes.length() == 0 ? 0 : Integer.parseInt(strRes);
|
25
26
|
}
|
26
27
|
|
27
28
|
public static long longValue(Object obj){
|
@@ -34,7 +35,8 @@ public class Number{
|
|
34
35
|
else if ( obj instanceof Byte )
|
35
36
|
return ((Byte)obj).byteValue();
|
36
37
|
|
37
|
-
|
38
|
+
String strRes = obj.toString();
|
39
|
+
return strRes==null || strRes.length() == 0 ? 0 : Long.parseLong(strRes);
|
38
40
|
}
|
39
41
|
|
40
42
|
public static double doubleValue(Object obj){
|
@@ -51,7 +53,8 @@ public class Number{
|
|
51
53
|
else if ( obj instanceof Byte )
|
52
54
|
return ((Byte)obj).byteValue();
|
53
55
|
|
54
|
-
|
56
|
+
String strRes = obj.toString();
|
57
|
+
return strRes==null || strRes.length() == 0 ? 0 : Double.parseDouble(strRes);
|
55
58
|
}
|
56
59
|
|
57
60
|
/*
|
@@ -103,7 +103,8 @@ final class CompiledStatementExecutor {
|
|
103
103
|
|
104
104
|
result = executeImpl(cs);
|
105
105
|
} catch (HsqlException e) {
|
106
|
-
if ( e.getErrorCode() == -Trace.VIOLATION_OF_UNIQUE_INDEX
|
106
|
+
if ( (e.getErrorCode() == -Trace.VIOLATION_OF_UNIQUE_INDEX ||
|
107
|
+
e.getErrorCode() == -Trace.VIOLATION_OF_UNIQUE_CONSTRAINT) &&
|
107
108
|
bReportNonUnique )
|
108
109
|
{}
|
109
110
|
else
|
@@ -260,6 +260,7 @@ public class Expression {
|
|
260
260
|
private String schema;
|
261
261
|
private String tableName;
|
262
262
|
private String columnName;
|
263
|
+
public String columnNameOrig;
|
263
264
|
private TableFilter tableFilter; // null if not yet resolved
|
264
265
|
TableFilter outerFilter; // defined if this is part of an OUTER JOIN condition tree
|
265
266
|
|
@@ -142,6 +142,7 @@ public class Result {
|
|
142
142
|
public String[] colLabels;
|
143
143
|
public String[] tableNames;
|
144
144
|
public String[] colNames;
|
145
|
+
public String[] colOrigNames;
|
145
146
|
public boolean[] isLabelQuoted;
|
146
147
|
public int[] colTypes;
|
147
148
|
public int[] colSizes;
|
@@ -179,6 +180,7 @@ public class Result {
|
|
179
180
|
colLabels = new String[columns];
|
180
181
|
tableNames = new String[columns];
|
181
182
|
colNames = new String[columns];
|
183
|
+
colOrigNames = new String[columns];
|
182
184
|
isLabelQuoted = new boolean[columns];
|
183
185
|
colTypes = new int[columns];
|
184
186
|
colSizes = new int[columns];
|
@@ -445,6 +445,7 @@ class Select {
|
|
445
445
|
rmd.schemaNames[i] = e.getTableSchemaName();
|
446
446
|
rmd.tableNames[i] = e.getTableName();
|
447
447
|
rmd.colNames[i] = e.getColumnName();
|
448
|
+
rmd.colOrigNames[i] = e.columnNameOrig;
|
448
449
|
|
449
450
|
if (rmd.isTableColumn(i)) {
|
450
451
|
rmd.colNullable[i] = e.nullability;
|
@@ -637,12 +638,17 @@ class Select {
|
|
637
638
|
int limitCount = 0;
|
638
639
|
|
639
640
|
if (limitCondition != null) {
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
641
|
+
Object obj = limitCondition.getArg2().getValue(session);
|
642
|
+
if ( obj != null )
|
643
|
+
if (obj instanceof Integer)
|
644
|
+
limitCount = ((Integer) limitCondition.getArg2().getValue(session)).intValue();
|
645
|
+
else if (obj instanceof Long)
|
646
|
+
limitCount = (int)((Long) limitCondition.getArg2().getValue(session)).longValue();
|
647
|
+
else
|
648
|
+
{
|
649
|
+
String strVal = obj.toString();
|
650
|
+
limitCount = Integer.parseInt(strVal);
|
651
|
+
}
|
646
652
|
}
|
647
653
|
|
648
654
|
if (rowCount != 0 && (limitCount == 0 || rowCount < limitCount)) {
|
@@ -163,13 +163,30 @@ public class Session implements SessionInterface {
|
|
163
163
|
//RHO
|
164
164
|
private IDBCallback m_dbCallback;
|
165
165
|
public interface IDBCallback {
|
166
|
-
public void
|
167
|
-
public void
|
166
|
+
public void onAfterInsert(Table table, Row row);
|
167
|
+
public void onBeforeUpdate(Table table, Row row, int[] cols);
|
168
|
+
public void onBeforeDelete(Table table, Row row);
|
168
169
|
};
|
169
170
|
|
170
171
|
public void setDBCallback(IDBCallback callback){
|
171
172
|
m_dbCallback = callback;
|
172
173
|
}
|
174
|
+
|
175
|
+
public void onAfterInsert(Table table, Row row)
|
176
|
+
{
|
177
|
+
if ( m_dbCallback != null )
|
178
|
+
m_dbCallback.onAfterInsert(table, row);
|
179
|
+
}
|
180
|
+
public void onBeforeUpdate(Table table, Row row, int[] cols)
|
181
|
+
{
|
182
|
+
if ( m_dbCallback != null )
|
183
|
+
m_dbCallback.onBeforeUpdate(table, row, cols);
|
184
|
+
}
|
185
|
+
public void onBeforeDelete(Table table, Row row)
|
186
|
+
{
|
187
|
+
if ( m_dbCallback != null )
|
188
|
+
m_dbCallback.onBeforeDelete(table, row);
|
189
|
+
}
|
173
190
|
//RHO
|
174
191
|
/**
|
175
192
|
* Constructs a new Session object.
|
@@ -419,8 +436,6 @@ public class Session implements SessionInterface {
|
|
419
436
|
*/
|
420
437
|
public boolean addDeleteAction(Table table, Row row) throws HsqlException {
|
421
438
|
m_bNeedCommit = true;//!isNestedTransaction;
|
422
|
-
if ( m_dbCallback != null )
|
423
|
-
m_dbCallback.onDeleteRow(table, row);
|
424
439
|
|
425
440
|
if (!isAutoCommit || isNestedTransaction) {
|
426
441
|
Transaction t = new Transaction(true, table, row, actionTimestamp);
|
@@ -457,18 +472,10 @@ public class Session implements SessionInterface {
|
|
457
472
|
database.txManager.addTransaction(this, t);
|
458
473
|
}
|
459
474
|
|
460
|
-
if ( m_dbCallback != null )
|
461
|
-
m_dbCallback.onInsertRow(table, row);
|
462
|
-
|
463
475
|
return true;
|
464
476
|
} else {
|
465
477
|
table.commitRowToStore(row);
|
466
|
-
|
467
|
-
if ( m_dbCallback != null )
|
468
|
-
m_dbCallback.onInsertRow(table, row);
|
469
|
-
|
470
478
|
}
|
471
|
-
|
472
479
|
|
473
480
|
return false;
|
474
481
|
}
|
@@ -1892,15 +1892,16 @@ public class Table extends BaseTable {
|
|
1892
1892
|
if (triggerLists[Trigger.INSERT_BEFORE_ROW] != null) {
|
1893
1893
|
fireAll(session, Trigger.INSERT_BEFORE_ROW, null, data);
|
1894
1894
|
}
|
1895
|
-
|
1895
|
+
|
1896
1896
|
setIdentityColumn(session, data);
|
1897
1897
|
checkRowDataInsert(session, data);
|
1898
|
-
insertNoCheck(session, data);
|
1898
|
+
Row row = insertNoCheck(session, data);
|
1899
1899
|
|
1900
1900
|
if (triggerLists[Trigger.INSERT_AFTER_ROW] != null) {
|
1901
1901
|
fireAll(session, Trigger.INSERT_AFTER_ROW, null, data);
|
1902
1902
|
checkRowDataInsert(session, data);
|
1903
1903
|
}
|
1904
|
+
session.onAfterInsert(this, row);
|
1904
1905
|
}
|
1905
1906
|
|
1906
1907
|
/**
|
@@ -1932,7 +1933,7 @@ public class Table extends BaseTable {
|
|
1932
1933
|
* UNIQUE or PRIMARY constraints are enforced by attempting to
|
1933
1934
|
* add the row to the indexes.
|
1934
1935
|
*/
|
1935
|
-
private
|
1936
|
+
private Row insertNoCheck(Session session,
|
1936
1937
|
Object[] data) throws HsqlException {
|
1937
1938
|
|
1938
1939
|
Row row = newRow(data);
|
@@ -1947,6 +1948,8 @@ public class Table extends BaseTable {
|
|
1947
1948
|
if (isLogged) {
|
1948
1949
|
database.logger.writeInsertStatement(session, this, data);
|
1949
1950
|
}
|
1951
|
+
|
1952
|
+
return row;
|
1950
1953
|
}
|
1951
1954
|
|
1952
1955
|
/**
|
@@ -2795,6 +2798,8 @@ public class Table extends BaseTable {
|
|
2795
2798
|
Object[] data = row.getData();
|
2796
2799
|
|
2797
2800
|
fireAll(session, Trigger.DELETE_BEFORE_ROW, data, null);
|
2801
|
+
session.onBeforeDelete(this, row);
|
2802
|
+
|
2798
2803
|
deleteNoCheck(session, row, true);
|
2799
2804
|
|
2800
2805
|
// fire the delete after statement trigger
|
@@ -3081,7 +3086,8 @@ public class Table extends BaseTable {
|
|
3081
3086
|
data);
|
3082
3087
|
checkRowDataUpdate(session, data, cols);
|
3083
3088
|
}
|
3084
|
-
|
3089
|
+
session.onBeforeUpdate(this, row, cols);
|
3090
|
+
|
3085
3091
|
insertNoCheck(session, data);
|
3086
3092
|
|
3087
3093
|
if (triggerLists[Trigger.UPDATE_AFTER_ROW] != null) {
|
@@ -819,9 +819,17 @@ public class Token {
|
|
819
819
|
Token.T_EXTRACT, Token.T_FOR, Token.T_FROM, Token.T_GROUP,
|
820
820
|
Token.T_HAVING, Token.T_IF, Token.T_INTO, Token.T_IFNULL,
|
821
821
|
Token.T_IS, Token.T_IN, Token.T_INTERSECT, Token.T_JOIN,
|
822
|
-
Token.T_INNER, Token.T_LEADING, Token.T_LIKE,
|
822
|
+
Token.T_INNER, Token.T_LEADING, Token.T_LIKE,
|
823
|
+
//RHO
|
824
|
+
Token.T_LIMIT,
|
825
|
+
//RHO
|
826
|
+
Token.T_MAX,
|
823
827
|
Token.T_MIN, Token.T_NEXT, Token.T_NULLIF, Token.T_NOT,
|
824
|
-
Token.T_NVL, Token.T_MINUS,
|
828
|
+
Token.T_NVL, Token.T_MINUS,
|
829
|
+
//RHO
|
830
|
+
Token.T_OFFSET,
|
831
|
+
//RHO
|
832
|
+
Token.T_ON, Token.T_ORDER, Token.T_OR,
|
825
833
|
Token.T_OUTER, Token.T_POSITION, Token.T_PRIMARY, Token.T_SELECT,
|
826
834
|
Token.T_SET, Token.T_SOME, Token.T_STDDEV_POP, Token.T_STDDEV_SAMP,
|
827
835
|
Token.T_SUBSTRING, Token.T_SUM, Token.T_THEN, Token.T_TO,
|
@@ -128,6 +128,7 @@ public class Tokenizer {
|
|
128
128
|
private int beginIndex;
|
129
129
|
private int iType;
|
130
130
|
private String sToken;
|
131
|
+
public String sTokenOrig;
|
131
132
|
private int indexLongNameFirst = -1;
|
132
133
|
private String sLongNameFirst = null;
|
133
134
|
private int typeLongNameFirst;
|
@@ -955,9 +956,8 @@ public class Tokenizer {
|
|
955
956
|
}
|
956
957
|
|
957
958
|
// fredt - todo new char[] to back sToken
|
958
|
-
|
959
|
-
|
960
|
-
iIndex).toUpperCase();//Locale.ENGLISH);
|
959
|
+
sTokenOrig = sCommand.substring(start, iIndex);
|
960
|
+
sToken = sTokenOrig.toUpperCase();//Locale.ENGLISH);
|
961
961
|
|
962
962
|
// the following only for NAME, not for NAMED_PARAM
|
963
963
|
if (iType == NAMED_PARAM) {
|
@@ -44,7 +44,7 @@ import j2me.math.BigInteger;
|
|
44
44
|
//import java.util.Properties;
|
45
45
|
import java.util.Hashtable;
|
46
46
|
//import j2me.text.Collator;
|
47
|
-
import com.rho.
|
47
|
+
import com.rho.file.RandomAccessFile;
|
48
48
|
import java.io.InputStream;
|
49
49
|
|
50
50
|
import org.hsqldb.lib.FileAccess;
|
@@ -152,7 +152,8 @@ public class HsqlProperties {
|
|
152
152
|
boolean badvalue = false;
|
153
153
|
|
154
154
|
try {
|
155
|
-
|
155
|
+
if ( prop != null )
|
156
|
+
defaultValue = Integer.parseInt(prop);
|
156
157
|
} catch (NumberFormatException e) {}
|
157
158
|
|
158
159
|
if (defaultValue < minimum) {
|
@@ -39,7 +39,7 @@ import com.rho.RhoEmptyLogger;
|
|
39
39
|
import com.rho.RhoEmptyProfiler;
|
40
40
|
import com.rho.RhoLogger;
|
41
41
|
import com.rho.RhoProfiler;
|
42
|
-
import com.rho.
|
42
|
+
import com.rho.file.RandomAccessFile;
|
43
43
|
//import java.lang.reflect.Constructor;
|
44
44
|
|
45
45
|
import org.hsqldb.Database;
|