Class LABKEY.FieldKey
Extends
LABKEY.SchemaKey.
FieldKey identifies a column from a table or query.
Use LABKEY.FieldKey.fromString() or LABKEY.FieldKey.fromParts() to create new FieldKeys.
Example: Create a new FieldKey for column "C" from foreign key column "A,B".
var fieldKey = LABKEY.FieldKey.fromParts(["A,B", "C"]); fieldKey.name; // => "C" fieldKey.parent; // => LABKEY.FieldKey for "A,B" fieldKey.toDisplayString(); // => "A,B/C" fieldKey.toString(); // => "A$CB/C" fieldKey.equals(LABKEY.FieldKey.fromString(fieldKey.toString())); // => true
Defined in: FieldKey.js.
Constructor Attributes | Constructor Name and Description |
---|---|
LABKEY.FieldKey(parent, name)
The FieldKey constructor is private - use fromString() or fromParts() instead.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
LABKEY.FieldKey.equals(other)
Compares QueryKeys for equality.
|
<static> |
LABKEY.FieldKey.fromParts(parts)
Create new FieldKey from an Array of unencoded FieldKey string parts.
|
<static> |
LABKEY.FieldKey.fromString(str)
Create new FieldKey from a FieldKey encoded string with parts separated by '/' characters.
|
<static> |
LABKEY.FieldKey.getName()
Get the unencoded QueryKey name.
|
<static> |
LABKEY.FieldKey.getParts()
Returns an Array of unencoded QueryKey parts.
|
<static> |
LABKEY.FieldKey.toDisplayString()
Returns a string suitable for display to the user.
|
<static> |
LABKEY.FieldKey.toJSON()
Returns the encoded QueryKey string as the JSON representation of a QueryKey.
|
toString()
Returns an encoded FieldKey string suitable for sending to the server.
|
Class Detail
LABKEY.FieldKey(parent, name)
The FieldKey constructor is private - use fromString() or fromParts() instead.
- Parameters:
- {string} name
- The FieldKey's unencoded name.
- {LABKEY.FieldKey} parent
- The parent FieldKey or null.
Method Detail
<static>
{boolean}
LABKEY.FieldKey.equals(other)
Compares QueryKeys for equality.
- Parameters:
- {QueryKey} other
- Returns:
- {boolean} true if this QueryKey and the other are the same.
<static>
{LABKEY.FieldKey}
LABKEY.FieldKey.fromParts(parts)
Create new FieldKey from an Array of unencoded FieldKey string parts.
- Parameters:
- {Array} parts
- Array of unencoded FieldKey string parts.
- Returns:
- {LABKEY.FieldKey}
<static>
{LABKEY.FieldKey}
LABKEY.FieldKey.fromString(str)
Create new FieldKey from a FieldKey encoded string with parts separated by '/' characters.
- Parameters:
- {string} str
- FieldKey string with FieldKey encoded parts separated by '/' characters.
- Returns:
- {LABKEY.FieldKey}
<static>
{string}
LABKEY.FieldKey.getName()
Get the unencoded QueryKey name.
- Returns:
- {string}
<static>
{Array}
LABKEY.FieldKey.getParts()
Returns an Array of unencoded QueryKey parts.
- Returns:
- {Array} Array of unencoded QueryKey parts.
<static>
LABKEY.FieldKey.toDisplayString()
Returns a string suitable for display to the user.
<static>
LABKEY.FieldKey.toJSON()
Returns the encoded QueryKey string as the JSON representation of a QueryKey.
Called by JSON.stringify().
{string}
toString()
Returns an encoded FieldKey string suitable for sending to the server.
- Returns:
- {string} Encoded FieldKey string.