HasPropertyNode


@ExperimentalAppSearchApi
class HasPropertyNode : FunctionNode


FunctionNode representing the `hasProperty` query function.

The `hasProperty` query function will return all documents that contain the given property and have values in the given property.

Summary

Public constructors

Constructor for a HasPropertyNode representing the query function `hasProperty`.

Public functions

String

Returns the name of the function represented by HasPropertyNode, stored in the enum FUNCTION_NAME_HAS_PROPERTY.

PropertyPath

Gets the PropertyPath representing the property being checked for some value in the document.

Unit

Sets the PropertyPath representing the property being checked for some value in the document.

Inherited Constants

From androidx.appsearch.ast.FunctionNode
const String!
FUNCTION_NAME_GET_SEARCH_STRING_PARAMETER = "getSearchStringParameter"

Name of the query function represented by androidx.appsearch.ast.query.GetSearchStringParameterNode.

const String!

Name of the query function represented by androidx.appsearch.ast.query.HasPropertyNode.

const String!
FUNCTION_NAME_PROPERTY_DEFINED = "propertyDefined"

Name of the query function represented by androidx.appsearch.ast.query.PropertyDefinedNode.

Inherited functions

From androidx.appsearch.ast.Node
(Mutable)List<Node!>

Get a list of the node's child Nodes.

Public constructors

HasPropertyNode

Added in 1.1.0-alpha06
HasPropertyNode(property: PropertyPath)

Constructor for a HasPropertyNode representing the query function `hasProperty`.

Parameters
property: PropertyPath

A PropertyPath representing the property to check whether or not it contains a value in the document.

Public functions

getFunctionName

Added in 1.1.0-alpha06
fun getFunctionName(): String

Returns the name of the function represented by HasPropertyNode, stored in the enum FUNCTION_NAME_HAS_PROPERTY.

getProperty

Added in 1.1.0-alpha06
fun getProperty(): PropertyPath

Gets the PropertyPath representing the property being checked for some value in the document.

setProperty

Added in 1.1.0-alpha06
fun setProperty(property: PropertyPath): Unit

Sets the PropertyPath representing the property being checked for some value in the document.