Results 1 to 3 of 3

Thread: filter/query

  1. #1
    Member
    Join Date
    Mar 2007
    Location
    London
    Posts
    12

    filter/query

    Hello All,

    I've been informed that it is possible to filter or effectlively run a query by modifying the schema string prior to connecting:

    For example:

    var schema = " command key id accountId=12345;
    .
    var table = new DynaMetapushTable("XYZ", schema, "COMMAND");

    Is this possible?
    Could you help on the syntax and what is possible?

    Thanks and regards

    James

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    975
    Hi James

    There is no built-in query management in Lightstreamer. However, the client can ask your adapters to perform filtering queries on the data in a couple of ways.

    1) By embedding the query in the item name, as (for instance) in
    Code:
    var schema = " command key id";
    var table = new DynaMetapushTable("XYZ[accountId=12345]", schema, "COMMAND");
    The Data Adapter is then responsible for recognizing each query as a legal item name, parsing it and supply data accordingly.

    2) By defining a Selector for a generic item and embedding the query in the Selector name, as in
    Code:
    var schema = " command key id";
    var table = new DynaMetapushTable("XYZ", schema, "COMMAND");
    table.setSelector("accountId=12345");
    The Metadata Adapter is then responsible for parsing and accepting the Selector name and recognizing the embedded query in isSelectorAllowed; then, for each event of the generic item, it should filter it according to the filter query in isSelected.
    See also this topic.

    Note that architectural and performance issues may guide the choice.

    Dario

  3. #3
    Member
    Join Date
    Mar 2007
    Location
    London
    Posts
    12

    Thanks

    Many thanks - seems exactly what I need.

 

 

Similar Threads

  1. Replies: 6
    Last Post: December 7th, 2010, 10:26 AM
  2. How does lightstreamer do the filter?
    By gengliangyu2008 in forum Adapter APIs
    Replies: 5
    Last Post: November 26th, 2010, 10:00 AM
  3. Replies: 3
    Last Post: January 21st, 2010, 01:25 PM
  4. Replies: 5
    Last Post: September 8th, 2009, 04:07 PM
  5. Query in data adapter
    By latha in forum Adapter APIs
    Replies: 2
    Last Post: May 20th, 2009, 01:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 06:34 PM.