DevExtreme React - EdmLiteral Methods

This section describes methods that control an EdmLiteral instance.

ctor(value)

Creates an EdmLiteral instance with a new value.

Parameters:
value:

String

A value in a format the OData's Abstract Type System defines.

App.js
  • // ...
  • import { EdmLiteral } from 'devextreme/data/odata/utils';
  •  
  • class App extends React.Component {
  • constructor(props) {
  • super(props);
  •  
  • this.edmLiteral = new EdmLiteral('100000L');
  • }
  • }
  • export default App;

valueOf()

Gets the EdmLiteral's value converted to a string.

Return Value:

String

The value.

App.js
  • // ...
  • import { EdmLiteral } from 'devextreme/data/odata/utils';
  •  
  • class App extends React.Component {
  • constructor(props) {
  • super(props);
  •  
  • this.edmLiteral = new EdmLiteral('100000L');
  • console.log(this.edmLiteral.valueOf()); // logs 100000L
  • }
  • }
  • export default App;