Page History
Wiki Markup |
---|
{hidden} DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden} {sub-section:description|text=}{sub-section}\\ {table:id=|class=servoy sSummery}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Server Property SummarySummery{th}{tr}{tbody}{tr}{td}{td}{td}[#servoy.rawSQL.allowClientCacheFlushes] {td}{tr}{tbody}{table}\\ {table:id=|class=servoy sSummery}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method SummarySummery{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#executeSQL]\(serverName, tableName, SQL, \[arguments]) Execute any SQL, returns true if successful.{td}{tr}{tbody}{tbody}{tr}{td}[JSDataSet]{td}{td}[#executeStoredProcedure]\(serverName, procedureDeclaration, \[arguments[], \[IODirectionality[], maxNrReturnedRows) Execute a stored procedure.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#flushAllClientsCache]\(serverName, tableName) Flush cached database data.{td}{tr}{tbody}{tbody}{tr}{td}[ServoyException]{td}{td}[#getException]\() If the result from a function was false, it will return the exception object.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#notifyDataChange]\(serverName, tableName, pksDataset, action) Notify clients about changes in records, based on pk(s).{td}{tr}{tbody}{table}\\ {table:id=serverProperty|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Server Property Details{th}{tr}{tbody:id=FDD88A94-947C-417D-B515-DE9CBB964303=servoy.rawSQL.allowClientCacheFlushes|class=node}{tr:id=name}{td}h6.servoy.rawSQL.allowClientCacheFlushes{td}{tr}{tr:id=des}{td}{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303servoy.rawSQL.allowClientCacheFlushes_des|text=|trigger=button}{sub-section}{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303servoy.rawSQL.allowClientCacheFlushes_des|trigger=none|class=sIndent}In case of performance problem you might want to disable this (true/false){sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303_prsservoy.rawSQL.allowClientCacheFlushes_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303_prsservoy.rawSQL.allowClientCacheFlushes_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303_retservoy.rawSQL.allowClientCacheFlushes_prs|text=|trigger=button}{sub-section}{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303_retservoy.rawSQL.allowClientCacheFlushes_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303_seeservoy.rawSQL.allowClientCacheFlushes_ret|text=|trigger=button}{sub-section}{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303_seeservoy.rawSQL.allowClientCacheFlushes_ret|trigger=none|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303servoy.rawSQL.allowClientCacheFlushes_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303_link|class=sIndentservoy.rawSQL.allowClientCacheFlushes_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samlink}{td}*SampleExternal links*\\{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303_samservoy.rawSQL.allowClientCacheFlushes_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:FDD88A94-947C-417D-B515-DE9CBB964303_sam|class=sIndentservoy.rawSQL.allowClientCacheFlushes_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:classid=lastDetailRowsam}{td}{td}{tr}{tbody}{table}\\ {table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height*Sample*\\{sub-section:servoy.rawSQL.allowClientCacheFlushes_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:servoy.rawSQL.allowClientCacheFlushes_sam|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ {table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=C5BF0E8E-0B65-40C7-A3C1-33CC3F001734=executeSQL|class=node}{tr:id=name}{td}h6.executeSQL{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}executeSQL{span}{span:id=iets|style=float: left;}\(serverName, tableName, SQL, \[arguments]){span}{td}{tr}{tr:id=des}{td}{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734_des|executeSQL_des|text=|trigger=button}{sub-section}{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734executeSQL_des|trigger=none|class=sIndent}Execute any SQL, returns true if successful.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734_prsexecuteSQL_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734_prsexecuteSQL_snc|trigger=none|class=sIndent}serverName tableNameReplace SQL \[arguments\] with version info{sub-section}{div}{td}{tr}{trbuilder-show}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734_retexecuteSQL_prs|text=|trigger=button}{sub-section}{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734_retexecuteSQL_prs|trigger=none|class=sIndent}[Boolean]serverName tableName SQL \[arguments] {sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734_seeexecuteSQL_ret|text=|trigger=button}{sub-section}{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734_see|class=sIndent|trigger=none}executeSQL_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734executeSQL_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734_link|class=sIndent|executeSQL_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samlink}{td}*SampleExternal links*\\{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734_samexecuteSQL_link|text=|trigger=button}{sub-section}{subdiv:class=sIndent}{sub-section:C5BF0E8E-0B65-40C7-A3C1-33CC3F001734_sam|class=sIndentexecuteSQL_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:executeSQL_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:executeSQL_sam|trigger=none}{code:language=javascript} /**************************************************************************** WARNING! You can cause data loss or serious data integrity compromises! You should have a THOROUGH understanding of both SQL and your backend database (and other interfaces that may use that backend) BEFORE YOU USE ANY OF THESE COMMANDS. You should also READ THE DOCUMENTATION BEFORE USING ANY OF THESE COMMANDS Note that when server names have been switched (databasemanager.switchServer),the real server names must be used here, plugins.rawSQL is not transparent to switched servers. ****************************************************************************/ //Execute any SQL, returns true if successful. var country = 'NL' var done = plugins.rawSQL.executeSQL("example_data","employees","update employees set country = ?", [country]) if (done) { //flush is required when changes are made in db plugins.rawSQL.flushAllClientsCache("example_data","employees") } else { var msg = plugins.rawSQL.getException().getMessage(); //see exception node for more info about the exception obj plugins.dialogs.showErrorDialog('Error', 'SQL exception: '+msg, 'Ok') } {code}{sub-section}{tddiv}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=007E197B-6F62-4F4D-A132-E7A850BF40DCexecuteStoredProcedure|class=node}{tr:id=name}{td}h6.executeStoredProcedure{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSDataSet]{span}{span:id=iets|style=float: left; font-weight: bold;}executeStoredProcedure{span}{span:id=iets|style=float: left;}\(serverName, procedureDeclaration, \[arguments[], \[IODirectionality[], maxNrReturnedRows){span}{td}{tr}{tr:id=des}{td}{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DCexecuteStoredProcedure_des|text=|trigger=button}{sub-section}{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DCexecuteStoredProcedure_des|trigger=none|class=sIndent}Execute a stored procedure.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DC_prsexecuteStoredProcedure_snc|text=|trigger=button}{sub-section}{div:sub-section:executeStoredProcedure_snc|trigger=none|class=sIndent}{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DC_prs|trigger=none}serverName procedureDeclaration \[arguments[\] \[IODirectionality[\] maxNrReturnedRows Replace with version info{sub-section}{divtd}{tdtr}{trbuilder-show}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DC_retexecuteStoredProcedure_prs|text=|trigger=button}{sub-section}{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DC_retexecuteStoredProcedure_prs|trigger=none|class=sIndent}[JSDataSet]serverName procedureDeclaration \[arguments\[] \[IODirectionality\[] maxNrReturnedRows {sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DC_seeexecuteStoredProcedure_ret|text=|trigger=button}{sub-section}{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DC_seeexecuteStoredProcedure_ret|trigger=none|class=sIndent|trigger=none}}[JSDataSet]{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DCexecuteStoredProcedure_see|text=|trigger=button}{sub-section}{subdiv:class=sIndent}{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DC_link|class=sIndentexecuteStoredProcedure_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samlink}{td}*SampleExternal links*\\{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DC_samexecuteStoredProcedure_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:007E197B-6F62-4F4D-A132-E7A850BF40DC_sam|class=sIndent|executeStoredProcedure_link|trigger=none}{code:language=javascript}sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:executeStoredProcedure_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:executeStoredProcedure_sam|trigger=none}{code:language=javascript} /**************************************************************************** WARNING! You can cause data loss or serious data integrity compromises! You should have a THOROUGH understanding of both SQL and your backend database (and other interfaces that may use that backend) BEFORE YOU USE ANY OF THESE COMMANDS. You should also READ THE DOCUMENTATION BEFORE USING ANY OF THESE COMMANDS Note that when server names have been switched (databasemanager.switchServer),the real server names must be used here, plugins.rawSQL is not transparent to switched servers. ****************************************************************************/ //Execute a stored procedure. var maxReturnedRows = 10;//useful to limit number of rows var procedure_declaration = '{?=calculate_interest_rate(?)}' var args = new Array() args[0] = java.sql.Types.NUMERIC args[1] = 3000 // define the types and direction, in this case a 0 for input data var typesArray = new Array(); typesArray[0]=1; typesArray[1]=0; var dataset = plugins.rawSQL.executeStoredProcedure(controller.getServerName(), procedure_declaration, args, typesArray,maxReturnedRows); //example to calc a strange total global_total = 0; for( var i = 1 ; i <= dataset.getMaxRowIndex() ; i++ ) { global_total = global_total + dataset.getValue(i,1); } {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=32E47DBD-5939-4EFF-B278-8193326A36E7flushAllClientsCache|class=node}{tr:id=name}{td}h6.flushAllClientsCache{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}flushAllClientsCache{span}{span:id=iets|style=float: left;}\(serverName, tableName){span}{td}{tr}{tr:id=des}{td}{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7flushAllClientsCache_des|text=|trigger=button}{sub-section}{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7flushAllClientsCache_des|trigger=none|class=sIndent}Flush cached database data. Use with extreme care, its affecting the performance of clients!{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7_prsflushAllClientsCache_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7_prsflushAllClientsCache_snc|trigger=none}serverName tableName {sub|class=sIndent} Replace with version info{sub-section}{divtd}{tdtr}{trbuilder-show}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7_retflushAllClientsCache_prs|text=|trigger=button}{sub-section}{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7_retflushAllClientsCache_prs|trigger=none|class=sIndent}[Boolean]serverName tableName {sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7_seeflushAllClientsCache_ret|text=|trigger=button}{sub-section}{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7_seeflushAllClientsCache_ret|trigger=none|class=sIndent|trigger=none}}[Boolean]{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7flushAllClientsCache_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7_link|class=sIndentflushAllClientsCache_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=samlink}{td}*SampleExternal links*\\{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7_samflushAllClientsCache_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:32E47DBD-5939-4EFF-B278-8193326A36E7_sam|class=sIndent|trigger=none}{code:language=javascript} flushAllClientsCache_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:flushAllClientsCache_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:flushAllClientsCache_sam|trigger=none}{code:language=javascript} /**************************************************************************** WARNING! You can cause data loss or serious data integrity compromises! You should have a THOROUGH understanding of both SQL and your backend database (and other interfaces that may use that backend) BEFORE YOU USE ANY OF THESE COMMANDS. You should also READ THE DOCUMENTATION BEFORE USING ANY OF THESE COMMANDS Note that when server names have been switched (databasemanager.switchServer),the real server names must be used here, plugins.rawSQL is not transparent to switched servers. ****************************************************************************/ //Flush cached database data. Use with extreme care, its affecting the performance of clients! var country = 'NL' var done = plugins.rawSQL.executeSQL("example_data","employees","update employees set country = ?", [country]) if (done) { //flush is required when changes are made in db plugins.rawSQL.flushAllClientsCache("example_data","employees") } else { var msg = plugins.rawSQL.getException().getMessage(); //see exception node for more info about the exception obj plugins.dialogs.showErrorDialog('Error', 'SQL exception: '+msg, 'Ok') } {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=007B7477-50B0-4A40-B98C-75FE0B448383=getException|class=node}{tr:id=name}{td}h6.getException{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[ServoyException]{span}{span:id=iets|style=float: left; font-weight: bold;}getException{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383getException_des|text=|trigger=button}{sub-section}{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383getException_des|trigger=none|class=sIndent}If the result from a function was false, it will return the exception object.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prssnc}{td}*ParametersSince*\\{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383_prsgetException_snc|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383_prsgetException_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=retprs}{td}*ReturnsParameters*\\{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383_retgetException_prs|text=|trigger=button}{sub-section}{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383_retgetException_prs|trigger=none|class=sIndent}[ServoyException]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383_see|textgetException_ret|text=|trigger=button}{sub-section}{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383_seegetException_ret|trigger=none|class=sIndent|trigger=none}}[ServoyException]{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383getException_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383_link|class=sIndent|getException_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:builder-show:permission=edit}{tr:id=samlink}{td}*SampleExternal links*\\{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383_samgetException_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:007B7477-50B0-4A40-B98C-75FE0B448383_sam|class=sIndentgetException_link|trigger=none}{builder-show:permission=edit}{code:language=javascript} {codesub-section}{div}{td}{tr}{builder-show}{sub-section}{td}{tr}{tr:classid=lastDetailRowsam}{td}{td}{tr}{tbody}{tbody:id=E08FED62-0F33-45D0-98AE-2225D77B9B04}{tr:id=name}{td}h6.notifyDataChange{td}{tr}{tr:id=sig}{td}{*Sample*\\{sub-section:getException_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getException_sam|trigger=none}{builder-show:permission=edit}{code:language=javascript} {code}{builder-show}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=notifyDataChange|class=node}{tr:id=name}{td}h6.notifyDataChange{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}notifyDataChange{span}{span:id=iets|style=float: left;}\(serverName, tableName, pksDataset, action){span{span}{td}{tr}{tr:id=des}{td}{sub-section:notifyDataChange_des|text=|trigger=button}{sub-section}{sub-section:notifyDataChange_des|trigger=none|class=sIndent}Notify clients about changes in records, based on pk(s). Use with extreme care, its affecting the performance of clients!{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=dessnc}{td}*Since*\\{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04_desnotifyDataChange_snc|text=|trigger=button}{sub-section}{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04_desnotifyDataChange_snc|trigger=none|class=sIndent}Notify clients about changes in records, based on pk(s). Use Replace with extreme care, its affecting the performance of clients!version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04notifyDataChange_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04notifyDataChange_prs|trigger=none|class=sIndent}serverName tableName pksDataset action {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04notifyDataChange_ret|text=|trigger=button}{sub-section}{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04notifyDataChange_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04notifyDataChange_see|text=|trigger=button}{sub-section}{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04div:class=sIndent}{sub-section:notifyDataChange_see|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04_seenotifyDataChange_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04notifyDataChange_link|class=sIndent|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04notifyDataChange_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E08FED62-0F33-45D0-98AE-2225D77B9B04notifyDataChange_sam|class=sIndent|trigger=none}{code:language=javascript} /**************************************************************************** WARNING! You can cause data loss or serious data integrity compromises! You should have a THOROUGH understanding of both SQL and your backend database (and other interfaces that may use that backend) BEFORE YOU USE ANY OF THESE COMMANDS. You should also READ THE DOCUMENTATION BEFORE USING ANY OF THESE COMMANDS Note that when server names have been switched (databasemanager.switchServer),the real server names must be used here, plugins.rawSQL is not transparent to switched servers. ****************************************************************************/ //Notify clients about changes in records, based on pk(s). Use with extreme care, its affecting the performance of clients! var action = 1 //pks deleted //var action = 2 //pks inserted //var action = 3 //pks updates var pksdataset = databaseManager.convertToDataSet(new Array(12,15,16,21)) var ok = plugins.rawSQL.notifyDataChange(controller.getServerName(), 'employees',pksdataset,action) {code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |
Overview
Content Tools
Activity