eval command has been removed without replacement in MongoDB Server 4.2.0.@Deprecated public class NamedMongoScript extends Object
ExecutableMongoScript assigned to a name that allows calling the function by its name once it
has been saved to the DB instance.| Constructor and Description |
|---|
NamedMongoScript(String name,
ExecutableMongoScript script)
Deprecated.
Creates new
NamedMongoScript. |
NamedMongoScript(String name,
String rawScript)
Deprecated.
Creates new
NamedMongoScript that can be saved to the DB instance. |
| Modifier and Type | Method and Description |
|---|---|
String |
getCode()
Deprecated.
Returns the actual script code.
|
String |
getName()
Deprecated.
Returns the name of the script.
|
ExecutableMongoScript |
getScript()
Deprecated.
Returns the underlying
ExecutableMongoScript. |
public NamedMongoScript(String name, String rawScript)
NamedMongoScript that can be saved to the DB instance.name - must not be null or empty.rawScript - the String representation of the JavaScript function. Must not be
null or empty.public NamedMongoScript(String name, ExecutableMongoScript script)
NamedMongoScript.name - must not be null or empty.script - must not be null.public String getCode()
public ExecutableMongoScript getScript()
ExecutableMongoScript.public String getName()
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.