-
Notifications
You must be signed in to change notification settings - Fork 102
/
Copy pathReadFunction.js
83 lines (79 loc) · 3.18 KB
/
ReadFunction.js
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
// Copyright 2013 SAP AG.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http: //www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific
// language governing permissions and limitations under the License.
'use strict';
var TypeCode = require('./TypeCode');
var ReadFunction = module.exports = {};
var READ_TINYINT = 'readTinyInt';
var READ_SMALLINT = 'readSmallInt';
var READ_INT = 'readInt';
var READ_BIGINT = 'readBigInt';
var READ_STRING = 'readString';
var READ_BINARY = 'readBinary';
var READ_DATE = 'readDate';
var READ_DAYDATE = 'readDayDate';
var READ_TIME = 'readTime';
var READ_SECONDTIME = 'readSecondTime';
var READ_TIMESTAMP = 'readTimestamp';
var READ_LONGDATE = 'readLongDate';
var READ_SECONDDATE = 'readSecondDate';
var READ_BLOB = 'readBLob';
var READ_CLOB = 'readCLob';
var READ_NCLOB = 'readNCLob';
var READ_DOUBLE = 'readDouble';
var READ_FLOAT = 'readFloat';
var READ_DECIMAL = 'readDecimal';
var READ_ALPHANUM = 'readAlphanum';
var READ_BOOLEAN = 'readBoolean';
var READ_FIXED8 = 'readFixed8';
var READ_FIXED12 = 'readFixed12';
var READ_FIXED16 = 'readFixed16';
ReadFunction[TypeCode.TINYINT] = READ_TINYINT;
ReadFunction[TypeCode.SMALLINT] = READ_SMALLINT;
ReadFunction[TypeCode.INT] = READ_INT;
ReadFunction[TypeCode.BIGINT] = READ_BIGINT;
ReadFunction[TypeCode.STRING] = READ_STRING;
ReadFunction[TypeCode.VARCHAR1] = READ_STRING;
ReadFunction[TypeCode.VARCHAR2] = READ_STRING;
ReadFunction[TypeCode.CHAR] = READ_STRING;
ReadFunction[TypeCode.NCHAR] = READ_STRING;
ReadFunction[TypeCode.NVARCHAR] = READ_STRING;
ReadFunction[TypeCode.NSTRING] = READ_STRING;
ReadFunction[TypeCode.SHORTTEXT] = READ_STRING;
ReadFunction[TypeCode.ALPHANUM] = READ_ALPHANUM;
ReadFunction[TypeCode.BINARY] = READ_BINARY;
ReadFunction[TypeCode.VARBINARY] = READ_BINARY;
ReadFunction[TypeCode.BSTRING] = READ_BINARY;
ReadFunction[TypeCode.DATE] = READ_DATE;
ReadFunction[TypeCode.TIME] = READ_TIME;
ReadFunction[TypeCode.TIMESTAMP] = READ_TIMESTAMP;
ReadFunction[TypeCode.DAYDATE] = READ_DAYDATE;
ReadFunction[TypeCode.SECONDTIME] = READ_SECONDTIME;
ReadFunction[TypeCode.LONGDATE] = READ_LONGDATE;
ReadFunction[TypeCode.SECONDDATE] = READ_SECONDDATE;
ReadFunction[TypeCode.BLOB] = READ_BLOB;
ReadFunction[TypeCode.LOCATOR] = READ_BLOB;
ReadFunction[TypeCode.CLOB] = READ_CLOB;
ReadFunction[TypeCode.NCLOB] = READ_NCLOB;
ReadFunction[TypeCode.NLOCATOR] = READ_NCLOB;
ReadFunction[TypeCode.TEXT] = READ_NCLOB;
ReadFunction[TypeCode.BINTEXT] = READ_NCLOB;
ReadFunction[TypeCode.DOUBLE] = READ_DOUBLE;
ReadFunction[TypeCode.REAL] = READ_FLOAT;
ReadFunction[TypeCode.DECIMAL] = READ_DECIMAL;
ReadFunction[TypeCode.ST_GEOMETRY] = READ_BINARY;
ReadFunction[TypeCode.ST_POINT] = READ_BINARY;
ReadFunction[TypeCode.BOOLEAN] = READ_BOOLEAN;
ReadFunction[TypeCode.FIXED8] = READ_FIXED8;
ReadFunction[TypeCode.FIXED12] = READ_FIXED12;
ReadFunction[TypeCode.FIXED16] = READ_FIXED16;