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.

...

  • Logical Expression - A filter will contain a logical expression which is evaluated on behalf of records in the filtered table(s). Only records, for which the expression evaluates to true, will be returned by any queries issued to the filtered table(s). At runtime, the filter will be translated into an SQL WHERE clauseand appended to the query of any foundset which is bound to the filtered table(s). An expression contains the following components:
    • Data Provider Name - This is the left-hand operand. It is the name of a single column by which to filter. When filtering an entire server connection, only tables which contain the named column will be filtered.
    • Operator - The following operators are supported 

      =

      Only records whose column equals the specified value

      <

      Only records whose column is less than the specified value

      >

      Only records whose column greater than the specified value

      >=

      Only records whose column greater than or equals the specified value

      <=

      Only records whose column less than or equalsthe specified value

      !=

      Only records whose column does not equal the specified value

      ^

      Only records whose column value is null

      LIKE

      Only records whose column matches using the SQL LIKE construct (use wildcard '%' characters)

      IN

      Only records whose column value is in (using the SQL IN construct) a list of values

      #

      Modifier, used to make case-insensitive queries

      ||

      Modifier used to concatenate two conditions w/ a logical OR

      Note

      Operators and modifiers may be combined, producing more complex conditions. For example #^||!= would translate to: is null OR case-insensitive not equals

    • Data Provider Value - This is the right-hand operand and should evaluate to a literal value to be compared with the named column.
Note

When using the IN operator, one should provide a comma separated list of valuesan array of values or a String, which may be used as a sub select for the SQL IN clause.

  • 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

This is a simple example which filters records in an prodcucts table based

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|