1 | "use strict";
|
2 | var __extends = (this && this.__extends) || (function () {
|
3 | var extendStatics = function (d, b) {
|
4 | extendStatics = Object.setPrototypeOf ||
|
5 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6 | function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7 | return extendStatics(d, b);
|
8 | };
|
9 | return function (d, b) {
|
10 | if (typeof b !== "function" && b !== null)
|
11 | throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12 | extendStatics(d, b);
|
13 | function __() { this.constructor = d; }
|
14 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15 | };
|
16 | })();
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | exports.CustomField = void 0;
|
19 | var field_1 = require("./field");
|
20 | var field_builder_1 = require("./field-builder");
|
21 | var CustomField = (function (_super) {
|
22 | __extends(CustomField, _super);
|
23 | function CustomField(fieldName, entityConstructor, isNullable) {
|
24 | if (isNullable === void 0) { isNullable = false; }
|
25 | var _this = _super.call(this, fieldName, entityConstructor, { isNullable: isNullable }) || this;
|
26 | _this.fieldBuilder = new field_builder_1.FieldBuilder(entityConstructor);
|
27 | return _this;
|
28 | }
|
29 | CustomField.prototype.edmString = function () {
|
30 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.String', this._fieldOptions.isNullable);
|
31 | };
|
32 | CustomField.prototype.edmBoolean = function () {
|
33 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.Boolean', this._fieldOptions.isNullable);
|
34 | };
|
35 | CustomField.prototype.edmGuid = function () {
|
36 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.Guid', this._fieldOptions.isNullable);
|
37 | };
|
38 | CustomField.prototype.edmDecimal = function () {
|
39 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.Decimal', this._fieldOptions.isNullable);
|
40 | };
|
41 | CustomField.prototype.edmInt16 = function () {
|
42 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.Int16', this._fieldOptions.isNullable);
|
43 | };
|
44 | CustomField.prototype.edmInt32 = function () {
|
45 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.Int32', this._fieldOptions.isNullable);
|
46 | };
|
47 | CustomField.prototype.edmInt64 = function () {
|
48 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.Int64', this._fieldOptions.isNullable);
|
49 | };
|
50 | CustomField.prototype.edmSingle = function () {
|
51 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.Single', this._fieldOptions.isNullable);
|
52 | };
|
53 | CustomField.prototype.edmDouble = function () {
|
54 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.Double', this._fieldOptions.isNullable);
|
55 | };
|
56 | CustomField.prototype.edmByte = function () {
|
57 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.Byte', this._fieldOptions.isNullable);
|
58 | };
|
59 | CustomField.prototype.edmSByte = function () {
|
60 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.SByte', this._fieldOptions.isNullable);
|
61 | };
|
62 | CustomField.prototype.edmDateTimeOffset = function () {
|
63 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.DateTimeOffset', this._fieldOptions.isNullable);
|
64 | };
|
65 | CustomField.prototype.edmBinary = function () {
|
66 | return this.fieldBuilder.buildEdmTypeField(this._fieldName, 'Edm.Binary', this._fieldOptions.isNullable);
|
67 | };
|
68 | return CustomField;
|
69 | }(field_1.Field));
|
70 | exports.CustomField = CustomField;
|
71 |
|
\ | No newline at end of file |