# Poco::MongoDB

# class JavaScriptCode

Library: MongoDB
Package: MongoDB
Header: Poco/MongoDB/JavaScriptCode.h

## Description

Represents JavaScript type in BSON.

## Member Summary

Member Functions: getCode, setCode

## Types Aliases

### Ptr

using Ptr = SharedPtr < JavaScriptCode >;

## Constructors

### JavaScriptCode

JavaScriptCode();

Creates an empty JavaScriptCode object.

## Destructor

### ~JavaScriptCode

virtual ~JavaScriptCode();

Destroys the JavaScriptCode.

## Member Functions

### getCode

[[nodiscard]]
std::string getCode() const;

Returns the JavaScript code.

### setCode

void setCode(
const std::string & code
);

Sets the JavaScript code.