
com.marklogic.client.expression.MapExpr Maven / Gradle / Ivy
Show all versions of marklogic-client-api Show documentation
/*
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
*/
package com.marklogic.client.expression;
import com.marklogic.client.type.XsBooleanVal;
import com.marklogic.client.type.XsStringSeqVal;
import com.marklogic.client.type.XsStringVal;
import com.marklogic.client.type.XsUnsignedIntVal;
import com.marklogic.client.type.ServerExpression;
// IMPORTANT: Do not edit. This file is generated.
/**
* Builds expressions to call functions in the map server library for a row
* pipeline.
*/
public interface MapExpr {
/**
* Returns true if the key exists in the map.
*
* Provides a client interface to the map:contains server function.
* @param map A map. (of map:map)
* @param key A key. (of xs:string)
* @return a server expression with the xs:boolean server data type
*/
public ServerExpression contains(ServerExpression map, String key);
/**
* Returns true if the key exists in the map.
*
*
*
* Provides a client interface to the map:contains server function.
* @param map A map. (of map:map)
* @param key A key. (of xs:string)
* @return a server expression with the xs:boolean server data type
*/
public ServerExpression contains(ServerExpression map, ServerExpression key);
/**
* Returns the number of keys used in the map.
*
*
*
* Provides a client interface to the map:count server function.
* @param map A map. (of map:map)
* @return a server expression with the xs:unsignedInt server data type
*/
public ServerExpression count(ServerExpression map);
/**
* Constructs a new map with a single entry consisting of the key and value specified as arguments. This is particularly helpful when used as part of an argument to map:new().
*
*
*
* Provides a client interface to the map:entry server function.
* @param key The map key. (of xs:string)
* @param value The map value. (of item)
* @return a server expression with the map:map server data type
*/
public ServerExpression entry(ServerExpression key, ServerExpression value);
/**
* Get a value from a map.
*
* Provides a client interface to the map:get server function.
* @param map A map. (of map:map)
* @param key A key. (of xs:string)
* @return a server expression with the item server data type
*/
public ServerExpression get(ServerExpression map, String key);
/**
* Get a value from a map.
*
*
*
* Provides a client interface to the map:get server function.
* @param map A map. (of map:map)
* @param key A key. (of xs:string)
* @return a server expression with the item server data type
*/
public ServerExpression get(ServerExpression map, ServerExpression key);
/**
* Get the keys used in the map.
*
*
*
* Provides a client interface to the map:keys server function.
* @param map A map. (of map:map)
* @return a server expression with the xs:string server data type
*/
public ServerExpression keys(ServerExpression map);
/**
* Creates a map.
*
*
*
* Provides a client interface to the map:map server function.
* @return a server expression with the map:map server data type
*/
public ServerExpression map();
/**
* Creates a map.
*
* Provides a client interface to the map:map server function.
* @param map A serialized map element. (of element-node)
* @return a server expression with the map:map server data type
*/
public ServerExpression map(ServerExpression map);
/**
* Constructs a new map by combining the keys from the maps given as an argument. If a given key exists in more than one argument map, the value from the last such map is used.
*
*
*
* Provides a client interface to the map:new server function.
* @return a server expression with the map:map server data type
*/
public ServerExpression newExpr();
/**
* Constructs a new map by combining the keys from the maps given as an argument. If a given key exists in more than one argument map, the value from the last such map is used.
*
* Provides a client interface to the map:new server function.
* @param maps The argument maps. (of map:map)
* @return a server expression with the map:map server data type
*/
public ServerExpression newExpr(ServerExpression maps);
}