Repository navigation
Expand file tree
/
Copy pathRecordset.js
More file actions
88 lines (79 loc) · 2.07 KB
/
Copy pathRecordset.js
File metadata and controls
88 lines (79 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*********************************************************************************
Copyright © SuperMap. All rights reserved.
Author: Wang zihao
E-mail: pridehao@gmail.com
**********************************************************************************/
import {NativeModules} from 'react-native';
let R = NativeModules.JSRecordset;
import Geometry from './Geometry.js';
import Dataset from './Dataset';
/**
* @class Recordset
* @deprecated
*/
export default class Recordset {
async getRecordCount(){
try{
var {recordCount} = await R.getRecordCount(this._SMRecordsetId);
return recordCount;
}catch (e){
console.error(e);
}
}
async dispose(){
try{
await R.dispose(this._SMRecordsetId);
}catch (e){
console.error(e);
}
}
async getGeometry(){
try{
var {geometryId} = await R.getGeometry(this._SMRecordsetId);
var geometry = new Geometry();
geometry._SMGeometryId = geometryId;
return geometry;
}catch (e){
console.error(e);
}
}
async isEOF(){
try{
var isEOF = await R.isEOF(this._SMRecordsetId);
return isEOF;
}catch (e){
console.error(e);
}
}
async getDataset(){
try{
var {datasetId} = await R.getDataset(this._SMRecordsetId);
var dataset = new Dataset();
dataset._SMDatasetId = datasetId;
return dataset;
}catch (e){
console.error(e);
}
}
async addNew(geometry){
try{
await R.addNew(this._SMRecordsetId,geometry._SMGeometryId);
}catch (e){
console.error(e);
}
}
async moveNext(){
try{
await R.moveNext(this._SMRecordsetId);
}catch (e){
console.error(e);
}
}
async update(){
try{
await R.update(this._SMRecordsetId);
}catch (e){
console.error(e);
}
}
}