lemon-core 2.2.20 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/test-helper.js +1 -1
- package/dist/common/test-helper.js.map +1 -1
- package/dist/controllers/dummy-controller.js.map +1 -1
- package/dist/cores/api-service.js.map +1 -1
- package/dist/cores/aws/aws-sns-service.js +3 -3
- package/dist/cores/aws/aws-sns-service.js.map +1 -1
- package/dist/cores/core-types.d.ts +92 -2
- package/dist/cores/core-types.js +1 -0
- package/dist/cores/core-types.js.map +1 -1
- package/dist/cores/dynamo-service.js +2 -2
- package/dist/cores/dynamo-service.js.map +1 -1
- package/dist/cores/elastic6-query-service.d.ts +42 -9
- package/dist/cores/elastic6-query-service.js +144 -134
- package/dist/cores/elastic6-query-service.js.map +1 -1
- package/dist/cores/elastic6-service.d.ts +144 -57
- package/dist/cores/elastic6-service.js +506 -322
- package/dist/cores/elastic6-service.js.map +1 -1
- package/dist/cores/lambda/lambda-cognito-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-cron-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-dynamo-stream-handler.js +3 -3
- package/dist/cores/lambda/lambda-dynamo-stream-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-notification-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-sns-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-web-handler.js +2 -4
- package/dist/cores/lambda/lambda-web-handler.js.map +1 -1
- package/dist/cores/lambda/lambda-wss-handler.js.map +1 -1
- package/dist/cores/protocol/protocol-service.d.ts +1 -2
- package/dist/cores/protocol/protocol-service.js +5 -3
- package/dist/cores/protocol/protocol-service.js.map +1 -1
- package/dist/engine/builder.d.ts +1 -0
- package/dist/engine/builder.js +1 -1
- package/dist/engine/builder.js.map +1 -1
- package/dist/engine/engine.js +2 -1
- package/dist/engine/engine.js.map +1 -1
- package/dist/engine/index.d.ts +0 -1
- package/dist/engine/index.js +2 -4
- package/dist/engine/index.js.map +1 -1
- package/dist/engine/types.d.ts +0 -4
- package/dist/engine/types.js.map +1 -1
- package/dist/engine/utilities.d.ts +5 -1
- package/dist/engine/utilities.js +126 -11
- package/dist/engine/utilities.js.map +1 -1
- package/dist/tools/express.js +0 -3
- package/dist/tools/express.js.map +1 -1
- package/package.json +6 -11
- package/CHANGELOG.md +0 -61
- package/dist/docs/assets/css/main.css +0 -2321
- package/dist/docs/assets/images/icons.png +0 -0
- package/dist/docs/assets/images/icons@2x.png +0 -0
- package/dist/docs/assets/images/widgets.png +0 -0
- package/dist/docs/assets/images/widgets@2x.png +0 -0
- package/dist/docs/assets/js/main.js +0 -1
- package/dist/docs/assets/js/search.js +0 -3
- package/dist/docs/classes/abstractmanager.html +0 -1054
- package/dist/docs/classes/apiproxyclient.html +0 -509
- package/dist/docs/classes/apiservice.html +0 -805
- package/dist/docs/classes/awskmsservice.html +0 -468
- package/dist/docs/classes/awsmodule.html +0 -353
- package/dist/docs/classes/awss3service.html +0 -563
- package/dist/docs/classes/awssnsservice.html +0 -543
- package/dist/docs/classes/awssqsservice.html +0 -517
- package/dist/docs/classes/cacheservice.html +0 -996
- package/dist/docs/classes/configmodule.html +0 -311
- package/dist/docs/classes/dummycacheservice.html +0 -1000
- package/dist/docs/classes/dummycontroller.html +0 -709
- package/dist/docs/classes/dummydynamoservice.html +0 -915
- package/dist/docs/classes/dummyelastic6service.html +0 -791
- package/dist/docs/classes/dummyredisstorageservice.html +0 -804
- package/dist/docs/classes/dummystoragemaker.html +0 -383
- package/dist/docs/classes/dummystorageservice.html +0 -592
- package/dist/docs/classes/dynamoqueryservice.html +0 -413
- package/dist/docs/classes/dynamoscanservice.html +0 -358
- package/dist/docs/classes/dynamoservice.html +0 -844
- package/dist/docs/classes/dynamostorageservice.html +0 -623
- package/dist/docs/classes/elastic6queryservice.html +0 -458
- package/dist/docs/classes/elastic6service.html +0 -804
- package/dist/docs/classes/generalapicontroller.html +0 -877
- package/dist/docs/classes/generalcontroller.html +0 -454
- package/dist/docs/classes/generalcontrollerlocal.html +0 -499
- package/dist/docs/classes/generalcontrollerlocal2.html +0 -523
- package/dist/docs/classes/generalkeymaker.html +0 -335
- package/dist/docs/classes/generalmodelfilter.html +0 -529
- package/dist/docs/classes/generalwebcontroller.html +0 -580
- package/dist/docs/classes/hangulservice.html +0 -636
- package/dist/docs/classes/httpstorageservice.html +0 -539
- package/dist/docs/classes/lambdacognitohandler.html +0 -355
- package/dist/docs/classes/lambdacronhandler.html +0 -390
- package/dist/docs/classes/lambdacronhandlerlocal.html +0 -371
- package/dist/docs/classes/lambdadynamostreamhandler.html +0 -472
- package/dist/docs/classes/lambdadynamostreamhandlerlocal.html +0 -455
- package/dist/docs/classes/lambdahandler.html +0 -479
- package/dist/docs/classes/lambdahandlerlocal.html +0 -472
- package/dist/docs/classes/lambdamodule.html +0 -433
- package/dist/docs/classes/lambdanotificationhandler.html +0 -474
- package/dist/docs/classes/lambdanotificationhandlerlocal.html +0 -457
- package/dist/docs/classes/lambdasnshandler.html +0 -394
- package/dist/docs/classes/lambdasnshandlerlocal.html +0 -397
- package/dist/docs/classes/lambdasqshandler.html +0 -394
- package/dist/docs/classes/lambdasqshandlerlocal.html +0 -397
- package/dist/docs/classes/lambdasubhandler.html +0 -305
- package/dist/docs/classes/lambdawebhandler.html +0 -603
- package/dist/docs/classes/lambdawebhandlerlocal.html +0 -581
- package/dist/docs/classes/lambdawsshandler.html +0 -359
- package/dist/docs/classes/memcachedbackend.html +0 -900
- package/dist/docs/classes/mocksapiservice.html +0 -691
- package/dist/docs/classes/modelutil.html +0 -311
- package/dist/docs/classes/myconfigservice.html +0 -561
- package/dist/docs/classes/myconfigservicetest.html +0 -527
- package/dist/docs/classes/myconfigservicetest2.html +0 -522
- package/dist/docs/classes/mydummysqsservice.html +0 -419
- package/dist/docs/classes/myenginemodules.html +0 -357
- package/dist/docs/classes/mygeneralapicontroller.html +0 -837
- package/dist/docs/classes/mylemonwebcontroller.html +0 -356
- package/dist/docs/classes/mymodelfilter.html +0 -479
- package/dist/docs/classes/myprotocolservice.html +0 -993
- package/dist/docs/classes/myprotocolservicetest.html +0 -983
- package/dist/docs/classes/myservice.html +0 -329
- package/dist/docs/classes/mystorage.html +0 -1370
- package/dist/docs/classes/nodecachebackend.html +0 -714
- package/dist/docs/classes/protocolmodule.html +0 -311
- package/dist/docs/classes/proxystorageservice.html +0 -1441
- package/dist/docs/classes/query.html +0 -850
- package/dist/docs/classes/redisbackend.html +0 -781
- package/dist/docs/classes/redisstorageservice.html +0 -867
- package/dist/docs/classes/s3putobjectrequestbuilder.html +0 -509
- package/dist/docs/classes/scan.html +0 -685
- package/dist/docs/classes/snsprotocoltransformer.html +0 -334
- package/dist/docs/classes/sqsprotocoltransformer.html +0 -334
- package/dist/docs/classes/typedstorageservice.html +0 -914
- package/dist/docs/classes/uniquefieldmanager.html +0 -477
- package/dist/docs/classes/usermanager.html +0 -931
- package/dist/docs/classes/utilities.html +0 -1914
- package/dist/docs/classes/webprotocoltransformer.html +0 -330
- package/dist/docs/globals.html +0 -7477
- package/dist/docs/index.html +0 -1519
- package/dist/docs/interfaces/accountitem.html +0 -277
- package/dist/docs/interfaces/accountmodel.html +0 -306
- package/dist/docs/interfaces/adaptiveparam.html +0 -203
- package/dist/docs/interfaces/apiheaders.html +0 -183
- package/dist/docs/interfaces/apihttpproxy.html +0 -304
- package/dist/docs/interfaces/apiserviceclient.html +0 -448
- package/dist/docs/interfaces/autocompletesearchparam.html +0 -309
- package/dist/docs/interfaces/betweencondition.html +0 -226
- package/dist/docs/interfaces/cachebackend.html +0 -714
- package/dist/docs/interfaces/cacheentry.html +0 -248
- package/dist/docs/interfaces/cacheoptions.html +0 -267
- package/dist/docs/interfaces/callbackdata.html +0 -279
- package/dist/docs/interfaces/callbackparam.html +0 -252
- package/dist/docs/interfaces/comparisoncondition.html +0 -226
- package/dist/docs/interfaces/coreconfigservice.html +0 -342
- package/dist/docs/interfaces/corekey.html +0 -278
- package/dist/docs/interfaces/corekeymakeable.html +0 -292
- package/dist/docs/interfaces/corekmsservice.html +0 -311
- package/dist/docs/interfaces/coremodel.html +0 -499
- package/dist/docs/interfaces/coremodelfilterable.html +0 -281
- package/dist/docs/interfaces/cores3service.html +0 -444
- package/dist/docs/interfaces/coreservices.html +0 -232
- package/dist/docs/interfaces/coresnsservice.html +0 -317
- package/dist/docs/interfaces/corewebcontroller.html +0 -271
- package/dist/docs/interfaces/cronevent.html +0 -223
- package/dist/docs/interfaces/cronparam.html +0 -212
- package/dist/docs/interfaces/dynamooption.html +0 -254
- package/dist/docs/interfaces/dynamoqueryresult.html +0 -244
- package/dist/docs/interfaces/dynamoscanresult.html +0 -244
- package/dist/docs/interfaces/dynamosimplequeriable.html +0 -308
- package/dist/docs/interfaces/dynamosimplescannable.html +0 -255
- package/dist/docs/interfaces/dynamostreambody.html +0 -268
- package/dist/docs/interfaces/dynamostreamcallback.html +0 -209
- package/dist/docs/interfaces/dynamostreamfilter.html +0 -218
- package/dist/docs/interfaces/dynamostreamparam.html +0 -240
- package/dist/docs/interfaces/elastic6item.html +0 -221
- package/dist/docs/interfaces/elastic6option.html +0 -275
- package/dist/docs/interfaces/elastic6simplequeriable.html +0 -284
- package/dist/docs/interfaces/engineconsole.html +0 -292
- package/dist/docs/interfaces/enginecore.html +0 -344
- package/dist/docs/interfaces/enginemodule.html +0 -269
- package/dist/docs/interfaces/enginemodules.html +0 -316
- package/dist/docs/interfaces/engineoption.html +0 -244
- package/dist/docs/interfaces/enginescope.html +0 -220
- package/dist/docs/interfaces/existencecondition.html +0 -212
- package/dist/docs/interfaces/filter.html +0 -253
- package/dist/docs/interfaces/generalfuntion.html +0 -207
- package/dist/docs/interfaces/generalitem.html +0 -212
- package/dist/docs/interfaces/handlermap.html +0 -171
- package/dist/docs/interfaces/incrementable.html +0 -190
- package/dist/docs/interfaces/internalkey.html +0 -210
- package/dist/docs/interfaces/internalmodel.html +0 -226
- package/dist/docs/interfaces/itementry.html +0 -241
- package/dist/docs/interfaces/jwtcommon.html +0 -242
- package/dist/docs/interfaces/lambdahandlerservice.html +0 -340
- package/dist/docs/interfaces/lemonengine.html +0 -593
- package/dist/docs/interfaces/metricpostbody.html +0 -220
- package/dist/docs/interfaces/mygeneral.html +0 -271
- package/dist/docs/interfaces/mymodel.html +0 -554
- package/dist/docs/interfaces/myprotocolparam.html +0 -359
- package/dist/docs/interfaces/nextcontext.html +0 -381
- package/dist/docs/interfaces/nextidentity.html +0 -325
- package/dist/docs/interfaces/nextidentityaccess.html +0 -495
- package/dist/docs/interfaces/nextidentitycognito.html +0 -422
- package/dist/docs/interfaces/notificationbody.html +0 -171
- package/dist/docs/interfaces/notificationparam.html +0 -304
- package/dist/docs/interfaces/options.html +0 -226
- package/dist/docs/interfaces/parrallelcallback.html +0 -203
- package/dist/docs/interfaces/parrallelparam.html +0 -285
- package/dist/docs/interfaces/protocolbody.html +0 -183
- package/dist/docs/interfaces/protocolparam.html +0 -336
- package/dist/docs/interfaces/protocolservice.html +0 -548
- package/dist/docs/interfaces/protocoltransformer.html +0 -295
- package/dist/docs/interfaces/proxyparams.html +0 -212
- package/dist/docs/interfaces/putobjectresult.html +0 -282
- package/dist/docs/interfaces/queryresult.html +0 -272
- package/dist/docs/interfaces/redisoptions.html +0 -248
- package/dist/docs/interfaces/simplesearchparam.html +0 -351
- package/dist/docs/interfaces/slackaction.html +0 -240
- package/dist/docs/interfaces/slackattachment.html +0 -459
- package/dist/docs/interfaces/slackpostbody.html +0 -240
- package/dist/docs/interfaces/sqsattribute.html +0 -171
- package/dist/docs/interfaces/sqsmessage.html +0 -254
- package/dist/docs/interfaces/sqsrecord.html +0 -324
- package/dist/docs/interfaces/sqsservice.html +0 -333
- package/dist/docs/interfaces/sqsstatistics.html +0 -240
- package/dist/docs/interfaces/storagemakeable.html +0 -258
- package/dist/docs/interfaces/storagemodel.html +0 -285
- package/dist/docs/interfaces/storageservice.html +0 -497
- package/dist/docs/interfaces/stringcondition.html +0 -226
- package/dist/docs/interfaces/tagset.html +0 -171
- package/dist/docs/interfaces/testmodel.html +0 -334
- package/dist/docs/interfaces/timeout.html +0 -233
- package/dist/docs/interfaces/updatable.html +0 -193
- package/dist/docs/interfaces/user.html +0 -534
|
@@ -1,1054 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html class="default no-js">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>AbstractManager | lemon-core - v2.2.20</title>
|
|
7
|
-
<meta name="description" content="">
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<link rel="stylesheet" href="../assets/css/main.css">
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<header>
|
|
13
|
-
<div class="tsd-page-toolbar">
|
|
14
|
-
<div class="container">
|
|
15
|
-
<div class="table-wrap">
|
|
16
|
-
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
|
|
17
|
-
<div class="field">
|
|
18
|
-
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
|
19
|
-
<input id="tsd-search-field" type="text" />
|
|
20
|
-
</div>
|
|
21
|
-
<ul class="results">
|
|
22
|
-
<li class="state loading">Preparing search index...</li>
|
|
23
|
-
<li class="state failure">The search index is not available</li>
|
|
24
|
-
</ul>
|
|
25
|
-
<a href="../index.html" class="title">lemon-core - v2.2.20</a>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="table-cell" id="tsd-widgets">
|
|
28
|
-
<div id="tsd-filter">
|
|
29
|
-
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
|
30
|
-
<div class="tsd-filter-group">
|
|
31
|
-
<div class="tsd-select" id="tsd-filter-visibility">
|
|
32
|
-
<span class="tsd-select-label">All</span>
|
|
33
|
-
<ul class="tsd-select-list">
|
|
34
|
-
<li data-value="public">Public</li>
|
|
35
|
-
<li data-value="protected">Public/Protected</li>
|
|
36
|
-
<li data-value="private" class="selected">All</li>
|
|
37
|
-
</ul>
|
|
38
|
-
</div>
|
|
39
|
-
<input type="checkbox" id="tsd-filter-inherited" checked />
|
|
40
|
-
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
|
41
|
-
<input type="checkbox" id="tsd-filter-externals" checked />
|
|
42
|
-
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
|
43
|
-
<input type="checkbox" id="tsd-filter-only-exported" />
|
|
44
|
-
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
<div class="tsd-page-title">
|
|
53
|
-
<div class="container">
|
|
54
|
-
<ul class="tsd-breadcrumb">
|
|
55
|
-
<li>
|
|
56
|
-
<a href="../globals.html">Globals</a>
|
|
57
|
-
</li>
|
|
58
|
-
<li>
|
|
59
|
-
<a href="abstractmanager.html">AbstractManager</a>
|
|
60
|
-
</li>
|
|
61
|
-
</ul>
|
|
62
|
-
<h1>Class AbstractManager<T, S, ModelType></h1>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</header>
|
|
66
|
-
<div class="container container-main">
|
|
67
|
-
<div class="row">
|
|
68
|
-
<div class="col-8 col-content">
|
|
69
|
-
<section class="tsd-panel tsd-comment">
|
|
70
|
-
<div class="tsd-comment tsd-typography">
|
|
71
|
-
<div class="lead">
|
|
72
|
-
<p>class: <code>AbstractManager</code></p>
|
|
73
|
-
<ul>
|
|
74
|
-
<li>abstract model manager to cover all models which extend CoreModel.</li>
|
|
75
|
-
<li>feature to handle 'name' like unique value in same type.</li>
|
|
76
|
-
<li>typed-storage based.</li>
|
|
77
|
-
</ul>
|
|
78
|
-
</div>
|
|
79
|
-
<dl class="tsd-comment-tags">
|
|
80
|
-
<dt>abstract</dt>
|
|
81
|
-
<dd></dd>
|
|
82
|
-
</dl>
|
|
83
|
-
</div>
|
|
84
|
-
</section>
|
|
85
|
-
<section class="tsd-panel tsd-type-parameters">
|
|
86
|
-
<h3>Type parameters</h3>
|
|
87
|
-
<ul class="tsd-type-parameters">
|
|
88
|
-
<li>
|
|
89
|
-
<h4>T<span class="tsd-signature-symbol">: </span><a href="../interfaces/coremodel.html" class="tsd-signature-type">CoreModel</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ModelType</span><span class="tsd-signature-symbol">></span></h4>
|
|
90
|
-
</li>
|
|
91
|
-
<li>
|
|
92
|
-
<h4>S<span class="tsd-signature-symbol">: </span><a href="../interfaces/storagemakeable.html" class="tsd-signature-type">StorageMakeable</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">ModelType</span><span class="tsd-signature-symbol">></span></h4>
|
|
93
|
-
</li>
|
|
94
|
-
<li>
|
|
95
|
-
<h4>ModelType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h4>
|
|
96
|
-
</li>
|
|
97
|
-
</ul>
|
|
98
|
-
</section>
|
|
99
|
-
<section class="tsd-panel tsd-hierarchy">
|
|
100
|
-
<h3>Hierarchy</h3>
|
|
101
|
-
<ul class="tsd-hierarchy">
|
|
102
|
-
<li>
|
|
103
|
-
<a href="generalmodelfilter.html" class="tsd-signature-type">GeneralModelFilter</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">ModelType</span><span class="tsd-signature-symbol">></span>
|
|
104
|
-
<ul class="tsd-hierarchy">
|
|
105
|
-
<li>
|
|
106
|
-
<span class="target">AbstractManager</span>
|
|
107
|
-
<ul class="tsd-hierarchy">
|
|
108
|
-
<li>
|
|
109
|
-
<a href="usermanager.html" class="tsd-signature-type">UserManager</a>
|
|
110
|
-
</li>
|
|
111
|
-
</ul>
|
|
112
|
-
</li>
|
|
113
|
-
</ul>
|
|
114
|
-
</li>
|
|
115
|
-
</ul>
|
|
116
|
-
</section>
|
|
117
|
-
<section class="tsd-panel">
|
|
118
|
-
<h3>Implements</h3>
|
|
119
|
-
<ul class="tsd-hierarchy">
|
|
120
|
-
<li><a href="../interfaces/coremodelfilterable.html" class="tsd-signature-type">CoreModelFilterable</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></li>
|
|
121
|
-
</ul>
|
|
122
|
-
</section>
|
|
123
|
-
<section class="tsd-panel-group tsd-index-group">
|
|
124
|
-
<h2>Index</h2>
|
|
125
|
-
<section class="tsd-panel tsd-index-panel">
|
|
126
|
-
<div class="tsd-index-content">
|
|
127
|
-
<section class="tsd-index-section tsd-is-private-protected">
|
|
128
|
-
<h3>Constructors</h3>
|
|
129
|
-
<ul class="tsd-index-list">
|
|
130
|
-
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="abstractmanager.html#constructor" class="tsd-kind-icon">constructor</a></li>
|
|
131
|
-
</ul>
|
|
132
|
-
</section>
|
|
133
|
-
<section class="tsd-index-section ">
|
|
134
|
-
<h3>Properties</h3>
|
|
135
|
-
<ul class="tsd-index-list">
|
|
136
|
-
<li class="tsd-kind-property tsd-parent-kind-class"><a href="abstractmanager.html#_unique" class="tsd-kind-icon">$unique</a></li>
|
|
137
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="abstractmanager.html#fields" class="tsd-kind-icon">FIELDS</a></li>
|
|
138
|
-
<li class="tsd-kind-property tsd-parent-kind-class"><a href="abstractmanager.html#ns" class="tsd-kind-icon">NS</a></li>
|
|
139
|
-
<li class="tsd-kind-property tsd-parent-kind-class"><a href="abstractmanager.html#parent" class="tsd-kind-icon">parent</a></li>
|
|
140
|
-
<li class="tsd-kind-property tsd-parent-kind-class"><a href="abstractmanager.html#storage" class="tsd-kind-icon">storage</a></li>
|
|
141
|
-
</ul>
|
|
142
|
-
</section>
|
|
143
|
-
<section class="tsd-index-section ">
|
|
144
|
-
<h3>Accessors</h3>
|
|
145
|
-
<ul class="tsd-index-list">
|
|
146
|
-
<li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="abstractmanager.html#type" class="tsd-kind-icon">type</a></li>
|
|
147
|
-
</ul>
|
|
148
|
-
</section>
|
|
149
|
-
<section class="tsd-index-section ">
|
|
150
|
-
<h3>Methods</h3>
|
|
151
|
-
<ul class="tsd-index-list">
|
|
152
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><a href="abstractmanager.html#_updatemodel" class="tsd-kind-icon">_update<wbr>Model</a></li>
|
|
153
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="abstractmanager.html#afterread" class="tsd-kind-icon">after<wbr>Read</a></li>
|
|
154
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="abstractmanager.html#aftersave" class="tsd-kind-icon">after<wbr>Save</a></li>
|
|
155
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="abstractmanager.html#afterupdate" class="tsd-kind-icon">after<wbr>Update</a></li>
|
|
156
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="abstractmanager.html#beforesave" class="tsd-kind-icon">before<wbr>Save</a></li>
|
|
157
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="abstractmanager.html#beforeupdate" class="tsd-kind-icon">before<wbr>Update</a></li>
|
|
158
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><a href="abstractmanager.html#delete" class="tsd-kind-icon">delete</a></li>
|
|
159
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><a href="abstractmanager.html#hello" class="tsd-kind-icon">hello</a></li>
|
|
160
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><a href="abstractmanager.html#insert" class="tsd-kind-icon">insert</a></li>
|
|
161
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="abstractmanager.html#onbeforesave" class="tsd-kind-icon">on<wbr>Before<wbr>Save</a></li>
|
|
162
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><a href="abstractmanager.html#prepare" class="tsd-kind-icon">prepare</a></li>
|
|
163
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="abstractmanager.html#preparedefault" class="tsd-kind-icon">prepare<wbr>Default</a></li>
|
|
164
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><a href="abstractmanager.html#retrieve" class="tsd-kind-icon">retrieve</a></li>
|
|
165
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><a href="abstractmanager.html#update" class="tsd-kind-icon">update</a></li>
|
|
166
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><a href="abstractmanager.html#updateorcreate" class="tsd-kind-icon">update<wbr>OrCreate</a></li>
|
|
167
|
-
</ul>
|
|
168
|
-
</section>
|
|
169
|
-
</div>
|
|
170
|
-
</section>
|
|
171
|
-
</section>
|
|
172
|
-
<section class="tsd-panel-group tsd-member-group tsd-is-private-protected">
|
|
173
|
-
<h2>Constructors</h2>
|
|
174
|
-
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
|
|
175
|
-
<a name="constructor" class="tsd-anchor"></a>
|
|
176
|
-
<h3><span class="tsd-flag ts-flagProtected">Protected</span> constructor</h3>
|
|
177
|
-
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
|
|
178
|
-
<li class="tsd-signature tsd-kind-icon">new <wbr>Abstract<wbr>Manager<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ModelType</span>, parent<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">S</span>, fields<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, uniqueField<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span>, ns<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="abstractmanager.html" class="tsd-signature-type">AbstractManager</a></li>
|
|
179
|
-
</ul>
|
|
180
|
-
<ul class="tsd-descriptions">
|
|
181
|
-
<li class="tsd-description">
|
|
182
|
-
<aside class="tsd-sources">
|
|
183
|
-
<p>Overrides <a href="generalmodelfilter.html">GeneralModelFilter</a>.<a href="generalmodelfilter.html#constructor">constructor</a></p>
|
|
184
|
-
<ul>
|
|
185
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L36">src/cores/model-manager.ts:36</a></li>
|
|
186
|
-
</ul>
|
|
187
|
-
</aside>
|
|
188
|
-
<div class="tsd-comment tsd-typography">
|
|
189
|
-
<div class="lead">
|
|
190
|
-
<p>default constructor</p>
|
|
191
|
-
</div>
|
|
192
|
-
</div>
|
|
193
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
194
|
-
<ul class="tsd-parameters">
|
|
195
|
-
<li>
|
|
196
|
-
<h5>type: <span class="tsd-signature-type">ModelType</span></h5>
|
|
197
|
-
<div class="tsd-comment tsd-typography">
|
|
198
|
-
<div class="lead">
|
|
199
|
-
<p>model type string</p>
|
|
200
|
-
</div>
|
|
201
|
-
</div>
|
|
202
|
-
</li>
|
|
203
|
-
<li>
|
|
204
|
-
<h5>parent: <span class="tsd-signature-type">S</span></h5>
|
|
205
|
-
<div class="tsd-comment tsd-typography">
|
|
206
|
-
<div class="lead">
|
|
207
|
-
<p>service instance which implements StorageMakeable interface</p>
|
|
208
|
-
</div>
|
|
209
|
-
</div>
|
|
210
|
-
</li>
|
|
211
|
-
<li>
|
|
212
|
-
<h5>fields: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
213
|
-
<div class="tsd-comment tsd-typography">
|
|
214
|
-
<div class="lead">
|
|
215
|
-
<p>list of model field names</p>
|
|
216
|
-
</div>
|
|
217
|
-
</div>
|
|
218
|
-
</li>
|
|
219
|
-
<li>
|
|
220
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> uniqueField: <span class="tsd-signature-type">string</span></h5>
|
|
221
|
-
<div class="tsd-comment tsd-typography">
|
|
222
|
-
<div class="lead">
|
|
223
|
-
<p>(optional) unique field name</p>
|
|
224
|
-
</div>
|
|
225
|
-
</div>
|
|
226
|
-
</li>
|
|
227
|
-
<li>
|
|
228
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> ns: <span class="tsd-signature-type">string</span></h5>
|
|
229
|
-
<div class="tsd-comment tsd-typography">
|
|
230
|
-
<div class="lead">
|
|
231
|
-
<p>(optional) namespace to be printed. pass NULL to suppress all logs.
|
|
232
|
-
global NS value will be used if not specified or undefined.</p>
|
|
233
|
-
</div>
|
|
234
|
-
</div>
|
|
235
|
-
</li>
|
|
236
|
-
</ul>
|
|
237
|
-
<h4 class="tsd-returns-title">Returns <a href="abstractmanager.html" class="tsd-signature-type">AbstractManager</a></h4>
|
|
238
|
-
</li>
|
|
239
|
-
</ul>
|
|
240
|
-
</section>
|
|
241
|
-
</section>
|
|
242
|
-
<section class="tsd-panel-group tsd-member-group ">
|
|
243
|
-
<h2>Properties</h2>
|
|
244
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
|
245
|
-
<a name="_unique" class="tsd-anchor"></a>
|
|
246
|
-
<h3>$unique</h3>
|
|
247
|
-
<div class="tsd-signature tsd-kind-icon">$unique<span class="tsd-signature-symbol">:</span> <a href="uniquefieldmanager.html" class="tsd-signature-type">UniqueFieldManager</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">ModelType</span><span class="tsd-signature-symbol">></span></div>
|
|
248
|
-
<aside class="tsd-sources">
|
|
249
|
-
<ul>
|
|
250
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L36">src/cores/model-manager.ts:36</a></li>
|
|
251
|
-
</ul>
|
|
252
|
-
</aside>
|
|
253
|
-
</section>
|
|
254
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
255
|
-
<a name="fields" class="tsd-anchor"></a>
|
|
256
|
-
<h3>FIELDS</h3>
|
|
257
|
-
<div class="tsd-signature tsd-kind-icon">FIELDS<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
|
|
258
|
-
<aside class="tsd-sources">
|
|
259
|
-
<p>Inherited from <a href="generalmodelfilter.html">GeneralModelFilter</a>.<a href="generalmodelfilter.html#fields">FIELDS</a></p>
|
|
260
|
-
<ul>
|
|
261
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/proxy-storage-service.ts#L206">src/cores/proxy-storage-service.ts:206</a></li>
|
|
262
|
-
</ul>
|
|
263
|
-
</aside>
|
|
264
|
-
</section>
|
|
265
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
|
266
|
-
<a name="ns" class="tsd-anchor"></a>
|
|
267
|
-
<h3>NS</h3>
|
|
268
|
-
<div class="tsd-signature tsd-kind-icon">NS<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
269
|
-
<aside class="tsd-sources">
|
|
270
|
-
<ul>
|
|
271
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L33">src/cores/model-manager.ts:33</a></li>
|
|
272
|
-
</ul>
|
|
273
|
-
</aside>
|
|
274
|
-
</section>
|
|
275
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
|
276
|
-
<a name="parent" class="tsd-anchor"></a>
|
|
277
|
-
<h3>parent</h3>
|
|
278
|
-
<div class="tsd-signature tsd-kind-icon">parent<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">S</span></div>
|
|
279
|
-
<aside class="tsd-sources">
|
|
280
|
-
<ul>
|
|
281
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L34">src/cores/model-manager.ts:34</a></li>
|
|
282
|
-
</ul>
|
|
283
|
-
</aside>
|
|
284
|
-
</section>
|
|
285
|
-
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
|
286
|
-
<a name="storage" class="tsd-anchor"></a>
|
|
287
|
-
<h3>storage</h3>
|
|
288
|
-
<div class="tsd-signature tsd-kind-icon">storage<span class="tsd-signature-symbol">:</span> <a href="typedstorageservice.html" class="tsd-signature-type">TypedStorageService</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">ModelType</span><span class="tsd-signature-symbol">></span></div>
|
|
289
|
-
<aside class="tsd-sources">
|
|
290
|
-
<ul>
|
|
291
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L35">src/cores/model-manager.ts:35</a></li>
|
|
292
|
-
</ul>
|
|
293
|
-
</aside>
|
|
294
|
-
</section>
|
|
295
|
-
</section>
|
|
296
|
-
<section class="tsd-panel-group tsd-member-group ">
|
|
297
|
-
<h2>Accessors</h2>
|
|
298
|
-
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class">
|
|
299
|
-
<a name="type" class="tsd-anchor"></a>
|
|
300
|
-
<h3>type</h3>
|
|
301
|
-
<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class">
|
|
302
|
-
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> type<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ModelType</span></li>
|
|
303
|
-
</ul>
|
|
304
|
-
<ul class="tsd-descriptions">
|
|
305
|
-
<li class="tsd-description">
|
|
306
|
-
<aside class="tsd-sources">
|
|
307
|
-
<ul>
|
|
308
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L63">src/cores/model-manager.ts:63</a></li>
|
|
309
|
-
</ul>
|
|
310
|
-
</aside>
|
|
311
|
-
<div class="tsd-comment tsd-typography">
|
|
312
|
-
<div class="lead">
|
|
313
|
-
<p>type getter</p>
|
|
314
|
-
</div>
|
|
315
|
-
</div>
|
|
316
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ModelType</span></h4>
|
|
317
|
-
</li>
|
|
318
|
-
</ul>
|
|
319
|
-
</section>
|
|
320
|
-
</section>
|
|
321
|
-
<section class="tsd-panel-group tsd-member-group ">
|
|
322
|
-
<h2>Methods</h2>
|
|
323
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
324
|
-
<a name="_updatemodel" class="tsd-anchor"></a>
|
|
325
|
-
<h3><span class="tsd-flag ts-flagPrivate">Private</span> _update<wbr>Model</h3>
|
|
326
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
327
|
-
<li class="tsd-signature tsd-kind-icon">_update<wbr>Model<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, model<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, $inc<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">T</span>, isCreate<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></li>
|
|
328
|
-
</ul>
|
|
329
|
-
<ul class="tsd-descriptions">
|
|
330
|
-
<li class="tsd-description">
|
|
331
|
-
<aside class="tsd-sources">
|
|
332
|
-
<ul>
|
|
333
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L187">src/cores/model-manager.ts:187</a></li>
|
|
334
|
-
</ul>
|
|
335
|
-
</aside>
|
|
336
|
-
<div class="tsd-comment tsd-typography">
|
|
337
|
-
<div class="lead">
|
|
338
|
-
<p>internal implementation for 'update' and 'updateOrCreate'</p>
|
|
339
|
-
</div>
|
|
340
|
-
</div>
|
|
341
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
342
|
-
<ul class="tsd-parameters">
|
|
343
|
-
<li>
|
|
344
|
-
<h5>id: <span class="tsd-signature-type">string</span></h5>
|
|
345
|
-
<div class="tsd-comment tsd-typography">
|
|
346
|
-
<p>model id</p>
|
|
347
|
-
</div>
|
|
348
|
-
</li>
|
|
349
|
-
<li>
|
|
350
|
-
<h5>model: <span class="tsd-signature-type">T</span></h5>
|
|
351
|
-
<div class="tsd-comment tsd-typography">
|
|
352
|
-
<p>model object</p>
|
|
353
|
-
</div>
|
|
354
|
-
</li>
|
|
355
|
-
<li>
|
|
356
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> $inc: <span class="tsd-signature-type">T</span></h5>
|
|
357
|
-
<div class="tsd-comment tsd-typography">
|
|
358
|
-
<p>(optional) incremental set</p>
|
|
359
|
-
</div>
|
|
360
|
-
</li>
|
|
361
|
-
<li>
|
|
362
|
-
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> isCreate: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></h5>
|
|
363
|
-
<div class="tsd-comment tsd-typography">
|
|
364
|
-
<p>(optional) flag to allow creating a new model (default: true)</p>
|
|
365
|
-
</div>
|
|
366
|
-
</li>
|
|
367
|
-
</ul>
|
|
368
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
369
|
-
</li>
|
|
370
|
-
</ul>
|
|
371
|
-
</section>
|
|
372
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
373
|
-
<a name="afterread" class="tsd-anchor"></a>
|
|
374
|
-
<h3>after<wbr>Read</h3>
|
|
375
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
376
|
-
<li class="tsd-signature tsd-kind-icon">after<wbr>Read<span class="tsd-signature-symbol">(</span>model<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, origin<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></li>
|
|
377
|
-
</ul>
|
|
378
|
-
<ul class="tsd-descriptions">
|
|
379
|
-
<li class="tsd-description">
|
|
380
|
-
<aside class="tsd-sources">
|
|
381
|
-
<p>Inherited from <a href="generalmodelfilter.html">GeneralModelFilter</a>.<a href="generalmodelfilter.html#afterread">afterRead</a></p>
|
|
382
|
-
<ul>
|
|
383
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/proxy-storage-service.ts#L220">src/cores/proxy-storage-service.ts:220</a></li>
|
|
384
|
-
</ul>
|
|
385
|
-
</aside>
|
|
386
|
-
<div class="tsd-comment tsd-typography">
|
|
387
|
-
<div class="lead">
|
|
388
|
-
<p>parse <code>.meta</code> to json</p>
|
|
389
|
-
</div>
|
|
390
|
-
</div>
|
|
391
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
392
|
-
<ul class="tsd-parameters">
|
|
393
|
-
<li>
|
|
394
|
-
<h5>model: <span class="tsd-signature-type">T</span></h5>
|
|
395
|
-
<div class="tsd-comment tsd-typography">
|
|
396
|
-
<p>the current model</p>
|
|
397
|
-
</div>
|
|
398
|
-
</li>
|
|
399
|
-
<li>
|
|
400
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> origin: <span class="tsd-signature-type">T</span></h5>
|
|
401
|
-
<div class="tsd-comment tsd-typography">
|
|
402
|
-
<p>the origin model</p>
|
|
403
|
-
</div>
|
|
404
|
-
</li>
|
|
405
|
-
</ul>
|
|
406
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">T</span></h4>
|
|
407
|
-
</li>
|
|
408
|
-
</ul>
|
|
409
|
-
</section>
|
|
410
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
411
|
-
<a name="aftersave" class="tsd-anchor"></a>
|
|
412
|
-
<h3>after<wbr>Save</h3>
|
|
413
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
414
|
-
<li class="tsd-signature tsd-kind-icon">after<wbr>Save<span class="tsd-signature-symbol">(</span>model<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, origin<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></li>
|
|
415
|
-
</ul>
|
|
416
|
-
<ul class="tsd-descriptions">
|
|
417
|
-
<li class="tsd-description">
|
|
418
|
-
<aside class="tsd-sources">
|
|
419
|
-
<p>Inherited from <a href="generalmodelfilter.html">GeneralModelFilter</a>.<a href="generalmodelfilter.html#aftersave">afterSave</a></p>
|
|
420
|
-
<ul>
|
|
421
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/proxy-storage-service.ts#L315">src/cores/proxy-storage-service.ts:315</a></li>
|
|
422
|
-
</ul>
|
|
423
|
-
</aside>
|
|
424
|
-
<div class="tsd-comment tsd-typography">
|
|
425
|
-
<div class="lead">
|
|
426
|
-
<p>called after saving the model.</p>
|
|
427
|
-
<ul>
|
|
428
|
-
<li>parse <code>.meta</code> back to json object.</li>
|
|
429
|
-
</ul>
|
|
430
|
-
</div>
|
|
431
|
-
</div>
|
|
432
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
433
|
-
<ul class="tsd-parameters">
|
|
434
|
-
<li>
|
|
435
|
-
<h5>model: <span class="tsd-signature-type">T</span></h5>
|
|
436
|
-
<div class="tsd-comment tsd-typography">
|
|
437
|
-
<p>the saved model</p>
|
|
438
|
-
</div>
|
|
439
|
-
</li>
|
|
440
|
-
<li>
|
|
441
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> origin: <span class="tsd-signature-type">T</span></h5>
|
|
442
|
-
<div class="tsd-comment tsd-typography">
|
|
443
|
-
<p>the origin model.</p>
|
|
444
|
-
</div>
|
|
445
|
-
</li>
|
|
446
|
-
</ul>
|
|
447
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">T</span></h4>
|
|
448
|
-
</li>
|
|
449
|
-
</ul>
|
|
450
|
-
</section>
|
|
451
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
452
|
-
<a name="afterupdate" class="tsd-anchor"></a>
|
|
453
|
-
<h3>after<wbr>Update</h3>
|
|
454
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
455
|
-
<li class="tsd-signature tsd-kind-icon">after<wbr>Update<span class="tsd-signature-symbol">(</span>model<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></li>
|
|
456
|
-
</ul>
|
|
457
|
-
<ul class="tsd-descriptions">
|
|
458
|
-
<li class="tsd-description">
|
|
459
|
-
<aside class="tsd-sources">
|
|
460
|
-
<p>Inherited from <a href="generalmodelfilter.html">GeneralModelFilter</a>.<a href="generalmodelfilter.html#afterupdate">afterUpdate</a></p>
|
|
461
|
-
<ul>
|
|
462
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/proxy-storage-service.ts#L332">src/cores/proxy-storage-service.ts:332</a></li>
|
|
463
|
-
</ul>
|
|
464
|
-
</aside>
|
|
465
|
-
<div class="tsd-comment tsd-typography">
|
|
466
|
-
<div class="lead">
|
|
467
|
-
<p>called after updating the model.</p>
|
|
468
|
-
</div>
|
|
469
|
-
</div>
|
|
470
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
471
|
-
<ul class="tsd-parameters">
|
|
472
|
-
<li>
|
|
473
|
-
<h5>model: <span class="tsd-signature-type">T</span></h5>
|
|
474
|
-
<div class="tsd-comment tsd-typography">
|
|
475
|
-
<p>the updated model</p>
|
|
476
|
-
</div>
|
|
477
|
-
</li>
|
|
478
|
-
</ul>
|
|
479
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">T</span></h4>
|
|
480
|
-
</li>
|
|
481
|
-
</ul>
|
|
482
|
-
</section>
|
|
483
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
484
|
-
<a name="beforesave" class="tsd-anchor"></a>
|
|
485
|
-
<h3>before<wbr>Save</h3>
|
|
486
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
487
|
-
<li class="tsd-signature tsd-kind-icon">before<wbr>Save<span class="tsd-signature-symbol">(</span>model<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, origin<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></li>
|
|
488
|
-
</ul>
|
|
489
|
-
<ul class="tsd-descriptions">
|
|
490
|
-
<li class="tsd-description">
|
|
491
|
-
<aside class="tsd-sources">
|
|
492
|
-
<p>Inherited from <a href="generalmodelfilter.html">GeneralModelFilter</a>.<a href="generalmodelfilter.html#beforesave">beforeSave</a></p>
|
|
493
|
-
<ul>
|
|
494
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/proxy-storage-service.ts#L236">src/cores/proxy-storage-service.ts:236</a></li>
|
|
495
|
-
</ul>
|
|
496
|
-
</aside>
|
|
497
|
-
<div class="tsd-comment tsd-typography">
|
|
498
|
-
<div class="lead">
|
|
499
|
-
<p>filter for before saving.</p>
|
|
500
|
-
<ul>
|
|
501
|
-
<li>make sure data conversion</li>
|
|
502
|
-
<li>move the unknown fields to <code>.meta</code>.</li>
|
|
503
|
-
</ul>
|
|
504
|
-
</div>
|
|
505
|
-
</div>
|
|
506
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
507
|
-
<ul class="tsd-parameters">
|
|
508
|
-
<li>
|
|
509
|
-
<h5>model: <span class="tsd-signature-type">T</span></h5>
|
|
510
|
-
<div class="tsd-comment tsd-typography">
|
|
511
|
-
<p>the current model</p>
|
|
512
|
-
</div>
|
|
513
|
-
</li>
|
|
514
|
-
<li>
|
|
515
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> origin: <span class="tsd-signature-type">T</span></h5>
|
|
516
|
-
<div class="tsd-comment tsd-typography">
|
|
517
|
-
<p>the origin model</p>
|
|
518
|
-
</div>
|
|
519
|
-
</li>
|
|
520
|
-
</ul>
|
|
521
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">T</span></h4>
|
|
522
|
-
</li>
|
|
523
|
-
</ul>
|
|
524
|
-
</section>
|
|
525
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
526
|
-
<a name="beforeupdate" class="tsd-anchor"></a>
|
|
527
|
-
<h3>before<wbr>Update</h3>
|
|
528
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
529
|
-
<li class="tsd-signature tsd-kind-icon">before<wbr>Update<span class="tsd-signature-symbol">(</span>model<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, incrementals<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></li>
|
|
530
|
-
</ul>
|
|
531
|
-
<ul class="tsd-descriptions">
|
|
532
|
-
<li class="tsd-description">
|
|
533
|
-
<aside class="tsd-sources">
|
|
534
|
-
<p>Inherited from <a href="generalmodelfilter.html">GeneralModelFilter</a>.<a href="generalmodelfilter.html#beforeupdate">beforeUpdate</a></p>
|
|
535
|
-
<ul>
|
|
536
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/proxy-storage-service.ts#L324">src/cores/proxy-storage-service.ts:324</a></li>
|
|
537
|
-
</ul>
|
|
538
|
-
</aside>
|
|
539
|
-
<div class="tsd-comment tsd-typography">
|
|
540
|
-
<div class="lead">
|
|
541
|
-
<p>called before updating the model.</p>
|
|
542
|
-
</div>
|
|
543
|
-
</div>
|
|
544
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
545
|
-
<ul class="tsd-parameters">
|
|
546
|
-
<li>
|
|
547
|
-
<h5>model: <span class="tsd-signature-type">T</span></h5>
|
|
548
|
-
<div class="tsd-comment tsd-typography">
|
|
549
|
-
<p>the updated model</p>
|
|
550
|
-
</div>
|
|
551
|
-
</li>
|
|
552
|
-
<li>
|
|
553
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> incrementals: <span class="tsd-signature-type">T</span></h5>
|
|
554
|
-
<div class="tsd-comment tsd-typography">
|
|
555
|
-
<p>(optional) incremental fields.</p>
|
|
556
|
-
</div>
|
|
557
|
-
</li>
|
|
558
|
-
</ul>
|
|
559
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">T</span></h4>
|
|
560
|
-
</li>
|
|
561
|
-
</ul>
|
|
562
|
-
</section>
|
|
563
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
564
|
-
<a name="delete" class="tsd-anchor"></a>
|
|
565
|
-
<h3>delete</h3>
|
|
566
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
567
|
-
<li class="tsd-signature tsd-kind-icon">delete<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, destroy<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></li>
|
|
568
|
-
</ul>
|
|
569
|
-
<ul class="tsd-descriptions">
|
|
570
|
-
<li class="tsd-description">
|
|
571
|
-
<aside class="tsd-sources">
|
|
572
|
-
<ul>
|
|
573
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L167">src/cores/model-manager.ts:167</a></li>
|
|
574
|
-
</ul>
|
|
575
|
-
</aside>
|
|
576
|
-
<div class="tsd-comment tsd-typography">
|
|
577
|
-
<div class="lead">
|
|
578
|
-
<p>default implementation of deleting model</p>
|
|
579
|
-
</div>
|
|
580
|
-
</div>
|
|
581
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
582
|
-
<ul class="tsd-parameters">
|
|
583
|
-
<li>
|
|
584
|
-
<h5>id: <span class="tsd-signature-type">string</span></h5>
|
|
585
|
-
<div class="tsd-comment tsd-typography">
|
|
586
|
-
<p>model id</p>
|
|
587
|
-
</div>
|
|
588
|
-
</li>
|
|
589
|
-
<li>
|
|
590
|
-
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> destroy: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></h5>
|
|
591
|
-
<div class="tsd-comment tsd-typography">
|
|
592
|
-
<p>flag for hard delete or soft delete (by setting 'deletedAt' field)</p>
|
|
593
|
-
</div>
|
|
594
|
-
</li>
|
|
595
|
-
</ul>
|
|
596
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
597
|
-
</li>
|
|
598
|
-
</ul>
|
|
599
|
-
</section>
|
|
600
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
601
|
-
<a name="hello" class="tsd-anchor"></a>
|
|
602
|
-
<h3>hello</h3>
|
|
603
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
604
|
-
<li class="tsd-signature tsd-kind-icon">hello<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
|
|
605
|
-
</ul>
|
|
606
|
-
<ul class="tsd-descriptions">
|
|
607
|
-
<li class="tsd-description">
|
|
608
|
-
<aside class="tsd-sources">
|
|
609
|
-
<ul>
|
|
610
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L58">src/cores/model-manager.ts:58</a></li>
|
|
611
|
-
</ul>
|
|
612
|
-
</aside>
|
|
613
|
-
<div class="tsd-comment tsd-typography">
|
|
614
|
-
<div class="lead">
|
|
615
|
-
<p>hello of this service-identity</p>
|
|
616
|
-
</div>
|
|
617
|
-
</div>
|
|
618
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
|
|
619
|
-
</li>
|
|
620
|
-
</ul>
|
|
621
|
-
</section>
|
|
622
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
623
|
-
<a name="insert" class="tsd-anchor"></a>
|
|
624
|
-
<h3>insert</h3>
|
|
625
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
626
|
-
<li class="tsd-signature tsd-kind-icon">insert<span class="tsd-signature-symbol">(</span>model<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></li>
|
|
627
|
-
</ul>
|
|
628
|
-
<ul class="tsd-descriptions">
|
|
629
|
-
<li class="tsd-description">
|
|
630
|
-
<aside class="tsd-sources">
|
|
631
|
-
<ul>
|
|
632
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L108">src/cores/model-manager.ts:108</a></li>
|
|
633
|
-
</ul>
|
|
634
|
-
</aside>
|
|
635
|
-
<div class="tsd-comment tsd-typography">
|
|
636
|
-
<div class="lead">
|
|
637
|
-
<p>default implementation of 'inserting' model</p>
|
|
638
|
-
</div>
|
|
639
|
-
</div>
|
|
640
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
641
|
-
<ul class="tsd-parameters">
|
|
642
|
-
<li>
|
|
643
|
-
<h5>model: <span class="tsd-signature-type">T</span></h5>
|
|
644
|
-
<div class="tsd-comment tsd-typography">
|
|
645
|
-
<p>model object</p>
|
|
646
|
-
</div>
|
|
647
|
-
</li>
|
|
648
|
-
</ul>
|
|
649
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
650
|
-
</li>
|
|
651
|
-
</ul>
|
|
652
|
-
</section>
|
|
653
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
|
|
654
|
-
<a name="onbeforesave" class="tsd-anchor"></a>
|
|
655
|
-
<h3>on<wbr>Before<wbr>Save</h3>
|
|
656
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
|
|
657
|
-
<li class="tsd-signature tsd-kind-icon">on<wbr>Before<wbr>Save<span class="tsd-signature-symbol">(</span>model<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, origin<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></li>
|
|
658
|
-
</ul>
|
|
659
|
-
<ul class="tsd-descriptions">
|
|
660
|
-
<li class="tsd-description">
|
|
661
|
-
<aside class="tsd-sources">
|
|
662
|
-
<p>Overrides <a href="generalmodelfilter.html">GeneralModelFilter</a>.<a href="generalmodelfilter.html#onbeforesave">onBeforeSave</a></p>
|
|
663
|
-
<ul>
|
|
664
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L81">src/cores/model-manager.ts:81</a></li>
|
|
665
|
-
</ul>
|
|
666
|
-
</aside>
|
|
667
|
-
<div class="tsd-comment tsd-typography">
|
|
668
|
-
<div class="lead">
|
|
669
|
-
<p>callback invoked just before the model is saved</p>
|
|
670
|
-
<ul>
|
|
671
|
-
<li>override this to customize default behavior to perform model validation, cleansing or normalization</li>
|
|
672
|
-
</ul>
|
|
673
|
-
</div>
|
|
674
|
-
</div>
|
|
675
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
676
|
-
<ul class="tsd-parameters">
|
|
677
|
-
<li>
|
|
678
|
-
<h5>model: <span class="tsd-signature-type">T</span></h5>
|
|
679
|
-
<div class="tsd-comment tsd-typography">
|
|
680
|
-
<p>model object</p>
|
|
681
|
-
</div>
|
|
682
|
-
</li>
|
|
683
|
-
<li>
|
|
684
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> origin: <span class="tsd-signature-type">T</span></h5>
|
|
685
|
-
<div class="tsd-comment tsd-typography">
|
|
686
|
-
<p>original model currently in the storage</p>
|
|
687
|
-
</div>
|
|
688
|
-
</li>
|
|
689
|
-
</ul>
|
|
690
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">T</span></h4>
|
|
691
|
-
</li>
|
|
692
|
-
</ul>
|
|
693
|
-
</section>
|
|
694
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
695
|
-
<a name="prepare" class="tsd-anchor"></a>
|
|
696
|
-
<h3>prepare</h3>
|
|
697
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
698
|
-
<li class="tsd-signature tsd-kind-icon">prepare<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, $def<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">T</span>, isCreate<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></li>
|
|
699
|
-
</ul>
|
|
700
|
-
<ul class="tsd-descriptions">
|
|
701
|
-
<li class="tsd-description">
|
|
702
|
-
<aside class="tsd-sources">
|
|
703
|
-
<ul>
|
|
704
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L92">src/cores/model-manager.ts:92</a></li>
|
|
705
|
-
</ul>
|
|
706
|
-
</aside>
|
|
707
|
-
<div class="tsd-comment tsd-typography">
|
|
708
|
-
<div class="lead">
|
|
709
|
-
<p>default implementation of 'preparing' model</p>
|
|
710
|
-
<ul>
|
|
711
|
-
<li>prepare model w/ safe creation</li>
|
|
712
|
-
</ul>
|
|
713
|
-
</div>
|
|
714
|
-
</div>
|
|
715
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
716
|
-
<ul class="tsd-parameters">
|
|
717
|
-
<li>
|
|
718
|
-
<h5>id: <span class="tsd-signature-type">string</span></h5>
|
|
719
|
-
<div class="tsd-comment tsd-typography">
|
|
720
|
-
<p>model-id to prepare</p>
|
|
721
|
-
</div>
|
|
722
|
-
</li>
|
|
723
|
-
<li>
|
|
724
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> $def: <span class="tsd-signature-type">T</span></h5>
|
|
725
|
-
<div class="tsd-comment tsd-typography">
|
|
726
|
-
<p>default model value</p>
|
|
727
|
-
</div>
|
|
728
|
-
</li>
|
|
729
|
-
<li>
|
|
730
|
-
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> isCreate: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></h5>
|
|
731
|
-
<div class="tsd-comment tsd-typography">
|
|
732
|
-
<p>(optional) flag to allow creating a new model (default: true)</p>
|
|
733
|
-
</div>
|
|
734
|
-
</li>
|
|
735
|
-
</ul>
|
|
736
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
737
|
-
</li>
|
|
738
|
-
</ul>
|
|
739
|
-
</section>
|
|
740
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
|
|
741
|
-
<a name="preparedefault" class="tsd-anchor"></a>
|
|
742
|
-
<h3><span class="tsd-flag ts-flagProtected">Protected</span> <span class="tsd-flag ts-flagAbstract">Abstract</span> prepare<wbr>Default</h3>
|
|
743
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
|
|
744
|
-
<li class="tsd-signature tsd-kind-icon">prepare<wbr>Default<span class="tsd-signature-symbol">(</span>$def<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></li>
|
|
745
|
-
</ul>
|
|
746
|
-
<ul class="tsd-descriptions">
|
|
747
|
-
<li class="tsd-description">
|
|
748
|
-
<aside class="tsd-sources">
|
|
749
|
-
<ul>
|
|
750
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L73">src/cores/model-manager.ts:73</a></li>
|
|
751
|
-
</ul>
|
|
752
|
-
</aside>
|
|
753
|
-
<div class="tsd-comment tsd-typography">
|
|
754
|
-
<div class="lead">
|
|
755
|
-
<p>prepare default model when creation</p>
|
|
756
|
-
<ul>
|
|
757
|
-
<li>sub classes should implement this method</li>
|
|
758
|
-
</ul>
|
|
759
|
-
</div>
|
|
760
|
-
<dl class="tsd-comment-tags">
|
|
761
|
-
<dt>abstract</dt>
|
|
762
|
-
<dd></dd>
|
|
763
|
-
</dl>
|
|
764
|
-
</div>
|
|
765
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
766
|
-
<ul class="tsd-parameters">
|
|
767
|
-
<li>
|
|
768
|
-
<h5>$def: <span class="tsd-signature-type">T</span></h5>
|
|
769
|
-
<div class="tsd-comment tsd-typography">
|
|
770
|
-
<p>default model</p>
|
|
771
|
-
</div>
|
|
772
|
-
</li>
|
|
773
|
-
</ul>
|
|
774
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">T</span></h4>
|
|
775
|
-
</li>
|
|
776
|
-
</ul>
|
|
777
|
-
</section>
|
|
778
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
779
|
-
<a name="retrieve" class="tsd-anchor"></a>
|
|
780
|
-
<h3>retrieve</h3>
|
|
781
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
782
|
-
<li class="tsd-signature tsd-kind-icon">retrieve<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></li>
|
|
783
|
-
</ul>
|
|
784
|
-
<ul class="tsd-descriptions">
|
|
785
|
-
<li class="tsd-description">
|
|
786
|
-
<aside class="tsd-sources">
|
|
787
|
-
<ul>
|
|
788
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L130">src/cores/model-manager.ts:130</a></li>
|
|
789
|
-
</ul>
|
|
790
|
-
</aside>
|
|
791
|
-
<div class="tsd-comment tsd-typography">
|
|
792
|
-
<div class="lead">
|
|
793
|
-
<p>default implementation of 'retrieving' model</p>
|
|
794
|
-
</div>
|
|
795
|
-
</div>
|
|
796
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
797
|
-
<ul class="tsd-parameters">
|
|
798
|
-
<li>
|
|
799
|
-
<h5>id: <span class="tsd-signature-type">string</span></h5>
|
|
800
|
-
<div class="tsd-comment tsd-typography">
|
|
801
|
-
<p>model id</p>
|
|
802
|
-
</div>
|
|
803
|
-
</li>
|
|
804
|
-
</ul>
|
|
805
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
806
|
-
</li>
|
|
807
|
-
</ul>
|
|
808
|
-
</section>
|
|
809
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
810
|
-
<a name="update" class="tsd-anchor"></a>
|
|
811
|
-
<h3>update</h3>
|
|
812
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
813
|
-
<li class="tsd-signature tsd-kind-icon">update<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, model<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, $inc<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></li>
|
|
814
|
-
</ul>
|
|
815
|
-
<ul class="tsd-descriptions">
|
|
816
|
-
<li class="tsd-description">
|
|
817
|
-
<aside class="tsd-sources">
|
|
818
|
-
<ul>
|
|
819
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L146">src/cores/model-manager.ts:146</a></li>
|
|
820
|
-
</ul>
|
|
821
|
-
</aside>
|
|
822
|
-
<div class="tsd-comment tsd-typography">
|
|
823
|
-
<div class="lead">
|
|
824
|
-
<p>default implementation of updating model</p>
|
|
825
|
-
</div>
|
|
826
|
-
</div>
|
|
827
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
828
|
-
<ul class="tsd-parameters">
|
|
829
|
-
<li>
|
|
830
|
-
<h5>id: <span class="tsd-signature-type">string</span></h5>
|
|
831
|
-
<div class="tsd-comment tsd-typography">
|
|
832
|
-
<p>model id</p>
|
|
833
|
-
</div>
|
|
834
|
-
</li>
|
|
835
|
-
<li>
|
|
836
|
-
<h5>model: <span class="tsd-signature-type">T</span></h5>
|
|
837
|
-
<div class="tsd-comment tsd-typography">
|
|
838
|
-
<p>model object</p>
|
|
839
|
-
</div>
|
|
840
|
-
</li>
|
|
841
|
-
<li>
|
|
842
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> $inc: <span class="tsd-signature-type">T</span></h5>
|
|
843
|
-
<div class="tsd-comment tsd-typography">
|
|
844
|
-
<p>(optional) incremental set</p>
|
|
845
|
-
</div>
|
|
846
|
-
</li>
|
|
847
|
-
</ul>
|
|
848
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
849
|
-
</li>
|
|
850
|
-
</ul>
|
|
851
|
-
</section>
|
|
852
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
853
|
-
<a name="updateorcreate" class="tsd-anchor"></a>
|
|
854
|
-
<h3>update<wbr>OrCreate</h3>
|
|
855
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
856
|
-
<li class="tsd-signature tsd-kind-icon">update<wbr>OrCreate<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, model<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span>, $inc<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></li>
|
|
857
|
-
</ul>
|
|
858
|
-
<ul class="tsd-descriptions">
|
|
859
|
-
<li class="tsd-description">
|
|
860
|
-
<aside class="tsd-sources">
|
|
861
|
-
<ul>
|
|
862
|
-
<li>Defined in <a href="https://github.com/lemoncloud-io/lemon-core/blob/a65cfcc/src/cores/model-manager.ts#L157">src/cores/model-manager.ts:157</a></li>
|
|
863
|
-
</ul>
|
|
864
|
-
</aside>
|
|
865
|
-
<div class="tsd-comment tsd-typography">
|
|
866
|
-
<div class="lead">
|
|
867
|
-
<p>default implementation of 'upserting' model</p>
|
|
868
|
-
</div>
|
|
869
|
-
</div>
|
|
870
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
871
|
-
<ul class="tsd-parameters">
|
|
872
|
-
<li>
|
|
873
|
-
<h5>id: <span class="tsd-signature-type">string</span></h5>
|
|
874
|
-
<div class="tsd-comment tsd-typography">
|
|
875
|
-
<p>model id</p>
|
|
876
|
-
</div>
|
|
877
|
-
</li>
|
|
878
|
-
<li>
|
|
879
|
-
<h5>model: <span class="tsd-signature-type">T</span></h5>
|
|
880
|
-
<div class="tsd-comment tsd-typography">
|
|
881
|
-
<p>model object</p>
|
|
882
|
-
</div>
|
|
883
|
-
</li>
|
|
884
|
-
<li>
|
|
885
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> $inc: <span class="tsd-signature-type">T</span></h5>
|
|
886
|
-
<div class="tsd-comment tsd-typography">
|
|
887
|
-
<p>(optional) incremental set</p>
|
|
888
|
-
</div>
|
|
889
|
-
</li>
|
|
890
|
-
</ul>
|
|
891
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
892
|
-
</li>
|
|
893
|
-
</ul>
|
|
894
|
-
</section>
|
|
895
|
-
</section>
|
|
896
|
-
</div>
|
|
897
|
-
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
898
|
-
<nav class="tsd-navigation primary">
|
|
899
|
-
<ul>
|
|
900
|
-
<li class="globals ">
|
|
901
|
-
<a href="../globals.html"><em>Globals</em></a>
|
|
902
|
-
</li>
|
|
903
|
-
</ul>
|
|
904
|
-
</nav>
|
|
905
|
-
<nav class="tsd-navigation secondary menu-sticky">
|
|
906
|
-
<ul class="before-current">
|
|
907
|
-
</ul>
|
|
908
|
-
<ul class="current">
|
|
909
|
-
<li class="current tsd-kind-class tsd-has-type-parameter">
|
|
910
|
-
<a href="abstractmanager.html" class="tsd-kind-icon">Abstract<wbr>Manager</a>
|
|
911
|
-
<ul>
|
|
912
|
-
<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite tsd-is-protected">
|
|
913
|
-
<a href="abstractmanager.html#constructor" class="tsd-kind-icon">constructor</a>
|
|
914
|
-
</li>
|
|
915
|
-
<li class=" tsd-kind-property tsd-parent-kind-class">
|
|
916
|
-
<a href="abstractmanager.html#_unique" class="tsd-kind-icon">$unique</a>
|
|
917
|
-
</li>
|
|
918
|
-
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
|
|
919
|
-
<a href="abstractmanager.html#fields" class="tsd-kind-icon">FIELDS</a>
|
|
920
|
-
</li>
|
|
921
|
-
<li class=" tsd-kind-property tsd-parent-kind-class">
|
|
922
|
-
<a href="abstractmanager.html#ns" class="tsd-kind-icon">NS</a>
|
|
923
|
-
</li>
|
|
924
|
-
<li class=" tsd-kind-property tsd-parent-kind-class">
|
|
925
|
-
<a href="abstractmanager.html#parent" class="tsd-kind-icon">parent</a>
|
|
926
|
-
</li>
|
|
927
|
-
<li class=" tsd-kind-property tsd-parent-kind-class">
|
|
928
|
-
<a href="abstractmanager.html#storage" class="tsd-kind-icon">storage</a>
|
|
929
|
-
</li>
|
|
930
|
-
<li class=" tsd-kind-get-signature tsd-parent-kind-class">
|
|
931
|
-
<a href="abstractmanager.html#type" class="tsd-kind-icon">type</a>
|
|
932
|
-
</li>
|
|
933
|
-
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-private">
|
|
934
|
-
<a href="abstractmanager.html#_updatemodel" class="tsd-kind-icon">_update<wbr>Model</a>
|
|
935
|
-
</li>
|
|
936
|
-
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
937
|
-
<a href="abstractmanager.html#afterread" class="tsd-kind-icon">after<wbr>Read</a>
|
|
938
|
-
</li>
|
|
939
|
-
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
940
|
-
<a href="abstractmanager.html#aftersave" class="tsd-kind-icon">after<wbr>Save</a>
|
|
941
|
-
</li>
|
|
942
|
-
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
943
|
-
<a href="abstractmanager.html#afterupdate" class="tsd-kind-icon">after<wbr>Update</a>
|
|
944
|
-
</li>
|
|
945
|
-
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
946
|
-
<a href="abstractmanager.html#beforesave" class="tsd-kind-icon">before<wbr>Save</a>
|
|
947
|
-
</li>
|
|
948
|
-
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
949
|
-
<a href="abstractmanager.html#beforeupdate" class="tsd-kind-icon">before<wbr>Update</a>
|
|
950
|
-
</li>
|
|
951
|
-
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
952
|
-
<a href="abstractmanager.html#delete" class="tsd-kind-icon">delete</a>
|
|
953
|
-
</li>
|
|
954
|
-
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
955
|
-
<a href="abstractmanager.html#hello" class="tsd-kind-icon">hello</a>
|
|
956
|
-
</li>
|
|
957
|
-
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
958
|
-
<a href="abstractmanager.html#insert" class="tsd-kind-icon">insert</a>
|
|
959
|
-
</li>
|
|
960
|
-
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
|
|
961
|
-
<a href="abstractmanager.html#onbeforesave" class="tsd-kind-icon">on<wbr>Before<wbr>Save</a>
|
|
962
|
-
</li>
|
|
963
|
-
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
964
|
-
<a href="abstractmanager.html#prepare" class="tsd-kind-icon">prepare</a>
|
|
965
|
-
</li>
|
|
966
|
-
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
|
|
967
|
-
<a href="abstractmanager.html#preparedefault" class="tsd-kind-icon">prepare<wbr>Default</a>
|
|
968
|
-
</li>
|
|
969
|
-
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
970
|
-
<a href="abstractmanager.html#retrieve" class="tsd-kind-icon">retrieve</a>
|
|
971
|
-
</li>
|
|
972
|
-
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
973
|
-
<a href="abstractmanager.html#update" class="tsd-kind-icon">update</a>
|
|
974
|
-
</li>
|
|
975
|
-
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
976
|
-
<a href="abstractmanager.html#updateorcreate" class="tsd-kind-icon">update<wbr>OrCreate</a>
|
|
977
|
-
</li>
|
|
978
|
-
</ul>
|
|
979
|
-
</li>
|
|
980
|
-
</ul>
|
|
981
|
-
<ul class="after-current">
|
|
982
|
-
</ul>
|
|
983
|
-
</nav>
|
|
984
|
-
</div>
|
|
985
|
-
</div>
|
|
986
|
-
</div>
|
|
987
|
-
<footer class="with-border-bottom">
|
|
988
|
-
<div class="container">
|
|
989
|
-
<h2>Legend</h2>
|
|
990
|
-
<div class="tsd-legend-group">
|
|
991
|
-
<ul class="tsd-legend">
|
|
992
|
-
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
|
|
993
|
-
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
|
|
994
|
-
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
|
|
995
|
-
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
|
|
996
|
-
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
|
|
997
|
-
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
|
|
998
|
-
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
|
|
999
|
-
<li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li>
|
|
1000
|
-
</ul>
|
|
1001
|
-
<ul class="tsd-legend">
|
|
1002
|
-
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
|
|
1003
|
-
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
|
|
1004
|
-
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
|
|
1005
|
-
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
|
|
1006
|
-
</ul>
|
|
1007
|
-
<ul class="tsd-legend">
|
|
1008
|
-
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
|
|
1009
|
-
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
|
|
1010
|
-
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
|
|
1011
|
-
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
|
1012
|
-
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
|
|
1013
|
-
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
|
|
1014
|
-
</ul>
|
|
1015
|
-
<ul class="tsd-legend">
|
|
1016
|
-
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
|
|
1017
|
-
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
|
|
1018
|
-
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
|
|
1019
|
-
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
|
|
1020
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
|
|
1021
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
|
|
1022
|
-
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
|
|
1023
|
-
</ul>
|
|
1024
|
-
<ul class="tsd-legend">
|
|
1025
|
-
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
|
|
1026
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
|
|
1027
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
|
|
1028
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
|
|
1029
|
-
</ul>
|
|
1030
|
-
<ul class="tsd-legend">
|
|
1031
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
|
|
1032
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
|
|
1033
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
|
|
1034
|
-
</ul>
|
|
1035
|
-
<ul class="tsd-legend">
|
|
1036
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
|
|
1037
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
|
|
1038
|
-
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
|
|
1039
|
-
</ul>
|
|
1040
|
-
<ul class="tsd-legend">
|
|
1041
|
-
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
|
|
1042
|
-
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
|
|
1043
|
-
</ul>
|
|
1044
|
-
</div>
|
|
1045
|
-
</div>
|
|
1046
|
-
</footer>
|
|
1047
|
-
<div class="container tsd-generator">
|
|
1048
|
-
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
|
1049
|
-
</div>
|
|
1050
|
-
<div class="overlay"></div>
|
|
1051
|
-
<script src="../assets/js/main.js"></script>
|
|
1052
|
-
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
|
|
1053
|
-
</body>
|
|
1054
|
-
</html>
|