Re: EOKeyComparisonQualifier

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu May 13 2004 - 16:25:05 EDT

  • Next message: Andrus Adamchik: "Re: Primary key generation issue"

    On May 13, 2004, at 3:12 PM, Budhiraja, Nikhil wrote:

    > just a quick question about how does cayenne know whether my value is
    > a value or a key...
    >  
    > is every string without a quote (") considered a key ?

    I haven't figured out an automated way to generate token specs in
    expression grammar at
    http://objectstyle.org/cayenne/grammar/ExpressionParser.html, so all
    the tokens look like a "black box" indeed.

    Answering your question, Strings are interpreted as one of the
    following tokens:

    1. If it starts with a digit, this is a numeric constant value (e.g. 1
    or 3.14)

    2. If it is enclosed in single or double quotes, it is a String
    constant value (e.g. "xyz" or 'abc')

    3. If it is unquoted and starts with a "_" or a letter, it is a key (or
    property path)

    4. If a token starts with $, it is a parameter.

    Andrus



    This archive was generated by hypermail 2.0.0 : Thu May 13 2004 - 16:25:13 EDT