Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When a user types a value into a text field (which is bound to a specific column of the database table) and clicks out, the Servoy Application Server issues a SQL update command to the database to modify the selected record. The resulting change is also broadcast|display/DOCS/Data+Broadcasting||||||||||||||||||||||||||||||||||||||||||||||||||\ to all connected clients.

...

The fundamental unit of data binding in both the GUI and the API is the Servoy Foundset|display/DOCS/Foundsets+Concepts||||||||||||||||||||||||||||||||||||||||||||||||||\ object.

Client Cache

A Servoy client instance keeps track of which database records are in use. This is called the Client Cache and it optimizes performance by reducing the number of queries made to the database. Records are tracked by primary key. The first time the contents of a record are accessed, the Application Server must issue a query to the database on behalf of the client. The values for all of the columns of the record object are held in memory and therefore, subsequent access of the record will not produce anymore queries to the database. The user experience is greatly enhanced as one can browse quickly between forms and cached records.
A record may fall out of the cache gracefully to conserve memory and is automatically reloaded the next time it is accessed. This happens at the discretion of the client's caching engine, which is highly optimized. Relieved of the burden of managing memory, the developer can focus on more important things.

...

  • Filter Name - When adding a table filter parameter, a filter name may be used to allow for the later removal of a named filter. Multiple parameters or conditions may be set using the same filter name. In this case, all parameters may be removed at the same time.

Example

*Example *This is a simple example which filters records in an prodcucts table baseda products table based on the criterion that the status is not discontinued

Code Block

var success = databaseManager.addTableFilterParam('crm_server','products','product_status','!=',globals.STATUS_DISCONTINUED,'productfilter');

Example This example shows a two filters using the IN operator

Code Block

// Filter products within an array of product codes
var success = databaseManager.addTableFilterParam('crm', 'products', 'productcode', 'in', [120, 144, 200]);


// Filter orders using a subselect
var success = databaseManager.addTableFilterParam('crm', 'orders', 'countrycode', 'in', 'select country code from countries where region = "Europe"')

Example This example shows how to filter an entire server connection by passing <null> for the table name. This is ideal for multi-tenant architectures

Code Block

// all tables that have the companyid column should be filtered
var success = databaseManager.addTableFilterParam('crm', null, 'companyidid', '=', currentcompanyid)
Tasklist
Completed||Priority||Locked||CreatedDate||CompletedDate||Assignee||Name||
|T|M|F|          |1303223270557|sdevlin|Updating the client cache?|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?p=85478#p85478 |
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?p=85475#p85475 |
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?p=78242#p78242 |
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?p=78547#p78547 |
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?p=77967#p77967 |
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=22&t=11684#p75081|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=22&t=11684#p75081|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=13&t=14089#p74182|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=22&t=14078#p74018|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=4&t=13931#p73033|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=22&t=13885#p72762|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=22&t=13646#p71003|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=3&t=13280#p68498|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=3&t=13276#p68496|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=22&t=13218#p68248|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=22&t=13171#p67928|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?f=8&t=13158#p67832|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?p=85817#p85808|
|F|M|F|          |          | |http://forum.servoy.com/viewtopic.php?p=85817#p85817|
|F|M|F|1302710297259|          |sdevlin|Programming Table Filters|
|F|M|F|1302710463580|          |sdevlin|Using a JSDataSet as a data source|
|F|M|F|1302710518262|          |sdevlin|Aborting Find mode|
|F|M|F|1302710564609|          |sdevlin|Audit Logging!|
|T|M|F|1302711045480|1303328879920|sdevlin|JSFoundsetUpdater|
|F|M|F|1302711649686|          |sdevlin|Difference Between Controller and Foundset|
|F|M|F|1302711717330|          |sdevlin|Filtering: Foundsets and Tables|
|F|M|F|1302711812803|          |sdevlin|Link to Performance Statistics in Deployment Guide|
|F|M|F|1302711904829|          |sdevlin|Foundsets: Iterating|
|F|M|F|1302711943338|          |sdevlin|Foundsets: Load Records|
|F|M|F|1302713173399|          |sdevlin|Link to DataBroadcast Event|
|F|M|F|1303225694915|          |sdevlin|Calculations: Used as a variable|
|F|M|F|1303225717501|          |sdevlin|Column Properties: Auto-Enter Lookups Link to relookup()|
|F|M|F|1309183255640|          |sdevlin|APP_UI_PROPERTY.LEAVE_FIELDS_READONLY_IN_FIND_MODE|