forked from Avanade/Beef
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.beef-5.json
1084 lines (1084 loc) · 47.8 KB
/
database.beef-5.json
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"title": "JSON Schema for Beef Database code-generation (https://github.com/Avanade/Beef).",
"$schema": "https://json-schema.org/draft-04/schema#",
"definitions": {
"CodeGeneration": {
"type": "object",
"title": "\u0027CodeGeneration\u0027 object (database-driven)",
"description": "The \u0060CodeGeneration\u0060 object defines global properties that are used to drive the underlying database-driven code generation.",
"properties": {
"schema": {
"type": "string",
"title": "The name of the \u0060Schema\u0060 where the artefacts are defined in, or should be created in, the database.",
"description": "This is used as the default \u0060Schema\u0060 for all child objects."
},
"replace": {
"type": "boolean",
"title": "Indicates whether the existing database object should be replaced/altered or whether the object is dropped and recreated.",
"description": "Defaults to \u0060true\u0060."
},
"columnNameIsDeleted": {
"type": "string",
"title": "The column name for the \u0060IsDeleted\u0060 capability.",
"description": "Defaults to \u0060IsDeleted\u0060."
},
"columnNameTenantId": {
"type": "string",
"title": "The column name for the \u0060TenantId\u0060 capability.",
"description": "Defaults to \u0060TenantId\u0060."
},
"columnNameOrgUnitId": {
"type": "string",
"title": "The column name for the \u0060OrgUnitId\u0060 capability.",
"description": "Defaults to \u0060OrgUnitId\u0060."
},
"columnNameRowVersion": {
"type": "string",
"title": "The column name for the \u0060RowVersion\u0060 capability.",
"description": "Defaults to \u0060RowVersion\u0060."
},
"columnNameCreatedBy": {
"type": "string",
"title": "The column name for the \u0060CreatedBy\u0060 capability.",
"description": "Defaults to \u0060CreatedBy\u0060."
},
"columnNameCreatedDate": {
"type": "string",
"title": "The column name for the \u0060CreatedDate\u0060 capability.",
"description": "Defaults to \u0060CreatedDate\u0060."
},
"columnNameUpdatedBy": {
"type": "string",
"title": "The column name for the \u0060UpdatedBy\u0060 capability.",
"description": "Defaults to \u0060UpdatedBy\u0060."
},
"columnNameUpdatedDate": {
"type": "string",
"title": "The column name for the \u0060UpdatedDate\u0060 capability.",
"description": "Defaults to \u0060UpdatedDate\u0060."
},
"columnNameDeletedBy": {
"type": "string",
"title": "The column name for the \u0060DeletedBy\u0060 capability.",
"description": "Defaults to \u0060UpdatedBy\u0060."
},
"columnNameDeletedDate": {
"type": "string",
"title": "The column name for the \u0060DeletedDate\u0060 capability.",
"description": "Defaults to \u0060UpdatedDate\u0060."
},
"orgUnitJoinSql": {
"type": "string",
"title": "The SQL table or function that is to be used to join against for security-based \u0060OrgUnitId\u0060 verification.",
"description": "Defaults to \u0060[Sec].[fnGetUserOrgUnits]()\u0060."
},
"checkUserPermissionSql": {
"type": "string",
"title": "The SQL stored procedure that is to be used for \u0060Permission\u0060 verification.",
"description": "Defaults to \u0060[Sec].[spCheckUserHasPermission]\u0060."
},
"getUserPermissionSql": {
"type": "string",
"title": "The SQL function that is to be used for \u0060Permission\u0060 verification.",
"description": "Defaults to \u0060[Sec].[fnGetUserHasPermission]\u0060."
},
"aliasColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 and \u0060Alias\u0060 pairs (split by a \u0060^\u0060 lookup character) to enable column aliasing/renaming.",
"description": "Each alias value should be formatted as \u0060Column\u0060 \u002B \u0060^\u0060 \u002B \u0060Alias\u0060; e.g. \u0060PCODE^ProductCode\u0060.",
"items": {
"type": "string"
}
},
"autoDotNetRename": {
"type": "string",
"title": "The option to automatically rename the SQL Tables and Columns for use in .NET.",
"description": "Defaults \u0060SnakeKebabToPascalCase\u0060 that will remove any underscores or hyphens separating each word and capitalize the first character of each; e.g. \u0060internal-customer_id\u0060 would be renamed as \u0060InternalCustomerId\u0060. The \u0060PascalCase\u0060 option will capatilize the first character only.",
"enum": [
"None",
"PascalCase",
"SnakeKebabToPascalCase"
]
},
"preprocessorDirectives": {
"type": "boolean",
"title": "Indicates whether to use preprocessor directives in the generated output."
},
"collectionType": {
"type": "string",
"title": "The collection type.",
"description": "Values are \u0060JSON\u0060 being a JSON array (preferred) or \u0060UDT\u0060 for a User-Defined Type (legacy). Defaults to \u0060JSON\u0060.",
"enum": [
"JSON",
"UDT"
]
},
"efModel": {
"type": "boolean",
"title": "Indicates whether an \u0060Entity Framework\u0060 .NET (C#) model is to be generated for all tables.",
"description": "This can be overridden within the \u0060Table\u0060(s)."
},
"outbox": {
"type": "boolean",
"title": "Indicates whether to generate the event outbox SQL and .NET artefacts.",
"description": "Defaults to \u0060false\u0060."
},
"outboxSchema": {
"type": "string",
"title": "The schema name of the event outbox table.",
"description": "Defaults to \u0060Outbox\u0060 (literal)."
},
"outboxSchemaCreate": {
"type": "boolean",
"title": "Indicates whether to create the \u0060OutboxSchema\u0060 within the database.",
"description": "Defaults to \u0060true\u0060."
},
"outboxTable": {
"type": "string",
"title": "The name of the event outbox table.",
"description": "Defaults to \u0060EventOutbox\u0060 (literal)."
},
"outboxEnqueueStoredProcedure": {
"type": "string",
"title": "The stored procedure name for the event outbox enqueue.",
"description": "Defaults to \u0060spEventOutboxEnqueue\u0060 (literal)."
},
"outboxDequeueStoredProcedure": {
"type": "string",
"title": "The stored procedure name for the event outbox dequeue.",
"description": "Defaults to \u0060spEventOutboxDequeue\u0060 (literal)."
},
"pathBase": {
"type": "string",
"title": "The base path (directory) prefix for the Database-related artefacts; other \u0060Path*\u0060 properties append to this value when they are not specifically overridden.",
"description": "Defaults to \u0060Company\u0060 (runtime parameter) \u002B \u0060.\u0060 \u002B \u0060AppName\u0060 (runtime parameter). For example \u0060Beef.Demo\u0060."
},
"pathDatabaseSchema": {
"type": "string",
"title": "The path (directory) for the Schema Database-related artefacts.",
"description": "Defaults to \u0060PathBase\u0060 \u002B \u0060.Database/Schema\u0060 (literal). For example \u0060Beef.Demo.Database/Schema\u0060."
},
"pathDatabaseMigrations": {
"type": "string",
"title": "The path (directory) for the Schema Database-related artefacts.",
"description": "Defaults to \u0060PathBase\u0060 \u002B \u0060.Database/Migrations\u0060 (literal). For example \u0060Beef.Demo.Database/Migrations\u0060."
},
"pathBusiness": {
"type": "string",
"title": "The path (directory) for the Business-related (.NET) artefacts.",
"description": "Defaults to \u0060PathBase\u0060 \u002B \u0060.Business\u0060 (literal). For example \u0060Beef.Demo.Business\u0060."
},
"orgUnitImmutable": {
"type": "boolean",
"title": "Indicates whether the \u0060OrgUnitId\u0060 column is considered immutable, in that it can not be changed once set.",
"description": "This is only applicable for stored procedures."
},
"namespaceBase": {
"type": "string",
"title": "The base Namespace (root) for the .NET artefacts.",
"description": "Defaults to \u0060Company\u0060 (runtime parameter) \u002B \u0060.\u0060 \u002B \u0060AppName\u0060 (runtime parameter). For example \u0060Beef.Demo\u0060."
},
"namespaceCommon": {
"type": "string",
"title": "The Namespace (root) for the Common-related .NET artefacts.",
"description": "Defaults to \u0060NamespaceBase\u0060 \u002B \u0060.Common\u0060 (literal). For example \u0060Beef.Demo.Common\u0060."
},
"namespaceBusiness": {
"type": "string",
"title": "The Namespace (root) for the Business-related .NET artefacts.",
"description": "Defaults to \u0060NamespaceBase\u0060 \u002B \u0060.Business\u0060 (literal). For example \u0060Beef.Demo.Business\u0060."
},
"namespaceOutbox": {
"type": "string",
"title": "The Namespace (root) for the Outbox-related Publisher .NET artefacts.",
"description": "Defaults to \u0060NamespaceBusiness\u0060."
},
"tables": {
"type": "array",
"title": "The corresponding \u0060Table\u0060 collection.",
"items": {
"$ref": "#/definitions/Table"
}
},
"queries": {
"type": "array",
"title": "The corresponding \u0060Query\u0060 collection.",
"items": {
"$ref": "#/definitions/Query"
}
}
}
},
"Table": {
"type": "object",
"title": "\u0027Table\u0027 object (entity-driven)",
"description": "The \u0060Table\u0060 object identifies an existing database \u0060Table\u0060 (or \u0060View\u0060) and defines its code-generation characteristics.",
"properties": {
"name": {
"type": "string",
"title": "The name of the \u0060Table\u0060 in the database."
},
"schema": {
"type": "string",
"title": "The name of the \u0060Schema\u0060 where the \u0060Table\u0060 is defined in the database.",
"description": "Defaults to \u0060CodeGeneration.Schema\u0060."
},
"alias": {
"type": "string",
"title": "The \u0060Schema.Table\u0060 alias name.",
"description": "Will automatically default where not specified."
},
"replace": {
"type": "boolean",
"title": "Indicates whether the existing database object should be replaced/altered or whether the object is dropped and recreated.",
"description": "Defaults to \u0060CodeGeneration.Replace\u0060."
},
"includeColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names to be included in the underlying generated output.",
"description": "Where not specified this indicates that all \u0060Columns\u0060 are to be included.",
"items": {
"type": "string"
}
},
"excludeColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names to be excluded from the underlying generated output.",
"description": "Where not specified this indicates no \u0060Columns\u0060 are to be excluded.",
"items": {
"type": "string"
}
},
"aliasColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 and \u0060Alias\u0060 pairs (split by a \u0060^\u0060 lookup character) to enable column aliasing/renaming.",
"description": "Each alias value should be formatted as \u0060Column\u0060 \u002B \u0060^\u0060 \u002B \u0060Alias\u0060; e.g. \u0060PCODE^ProductCode\u0060.",
"items": {
"type": "string"
}
},
"jsonAliasColumns": {
"type": "array",
"title": "The list of JSON \u0060Column\u0060 and \u0060JsonAlias\u0060 pairs (split by a \u0060^\u0060 lookup character) to enable column aliasing/renaming.",
"description": "Each alias value should be formatted as \u0060Column\u0060 \u002B \u0060^\u0060 \u002B \u0060Alias\u0060; e.g. \u0060ProductCode^product\u0060.",
"items": {
"type": "string"
}
},
"get": {
"type": "boolean",
"title": "Indicates whether a \u0060Get\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified."
},
"getAll": {
"type": "boolean",
"title": "Indicates whether a \u0060GetAll\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified.",
"description": "The \u0060GetAllOrderBy\u0060 is used to specify the \u0060GetAll\u0060 query sort order."
},
"getAllOrderBy": {
"type": "array",
"title": "The list of \u0060Column\u0060 names (including sort order \u0060ASC\u0060/\u0060DESC\u0060 literal) to be used as the \u0060GetAll\u0060 query sort order.",
"description": "This relates to the \u0060GetAll\u0060 selection.",
"items": {
"type": "string"
}
},
"create": {
"type": "boolean",
"title": "Indicates whether a \u0060Create\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified."
},
"update": {
"type": "boolean",
"title": "Indicates whether a \u0060Update\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified."
},
"upsert": {
"type": "boolean",
"title": "Indicates whether a \u0060Upsert\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified."
},
"delete": {
"type": "boolean",
"title": "Indicates whether a \u0060Delete\u0060 stored procedure is to be automatically generated where not otherwise explicitly specified."
},
"merge": {
"type": "boolean",
"title": "Indicates whether a \u0060Merge\u0060 (insert/update/delete of \u0060Udt\u0060 list) stored procedure is to be automatically generated where not otherwise explicitly specified.",
"description": "This will also require a \u0060Udt\u0060 (SQL User Defined Table) and \u0060Tvp\u0060 (.NET Table-Valued Parameter) to function."
},
"efModel": {
"type": "boolean",
"title": "Indicates whether an \u0060Entity Framework\u0060 .NET (C#) model is to be generated.",
"description": "Defaults to \u0060CodeGeneration.EfModel\u0060."
},
"efModelName": {
"type": "string",
"title": "The .NET (C#) EntityFramework (EF) model name.",
"description": "Defaults to \u0060Name\u0060 applying the \u0060CodeGeneration.AutoDotNetRename\u0060."
},
"udt": {
"type": "boolean",
"title": "Indicates whether a \u0060User Defined Table (UDT)\u0060 type should be created."
},
"udtExcludeColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names to be excluded from the \u0060User Defined Table (UDT)\u0060.",
"description": "Where not specified this indicates that no \u0060Columns\u0060 are to be excluded.",
"items": {
"type": "string"
}
},
"tvp": {
"type": "string",
"title": "The name of the .NET entity associated with the \u0060Udt\u0060 so that it can be expressed (created) as a Table-Valued Parameter for usage within the corresponding \u0060DbMapper\u0060."
},
"collectionType": {
"type": "string",
"title": "The collection type.",
"description": "Values are \u0060JSON\u0060 being a JSON array (preferred) or \u0060UDT\u0060 for a User-Defined Type (legacy). Defaults to \u0060Config.CollectionType\u0060.",
"enum": [
"JSON",
"UDT"
]
},
"permission": {
"type": "string",
"title": "The permission (prefix) to be used for security permission checking (suffix defaults to \u0060Read\u0060, \u0060Write\u0060 or \u0060Delete\u0060 and can be overridden in the underlying stored procedure)."
},
"orgUnitImmutable": {
"type": "boolean",
"title": "Indicates whether the \u0060OrgUnitId\u0060 column is considered immutable, in that it can not be changed once set.",
"description": "Defaults to \u0060CodeGeneration.OrgUnitImmutable\u0060. This is only applicable for stored procedures."
},
"columnNameIsDeleted": {
"type": "string",
"title": "The column name for the \u0060IsDeleted\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.IsDeleted\u0060."
},
"columnNameTenantId": {
"type": "string",
"title": "The column name for the \u0060TenantId\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.TenantId\u0060."
},
"columnNameOrgUnitId": {
"type": "string",
"title": "The column name for the \u0060OrgUnitId\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.OrgUnitId\u0060."
},
"columnNameRowVersion": {
"type": "string",
"title": "The column name for the \u0060RowVersion\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.RowVersion\u0060."
},
"columnNameCreatedBy": {
"type": "string",
"title": "The column name for the \u0060CreatedBy\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.CreatedBy\u0060."
},
"columnNameCreatedDate": {
"type": "string",
"title": "The column name for the \u0060CreatedDate\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.CreatedDate\u0060."
},
"columnNameUpdatedBy": {
"type": "string",
"title": "The column name for the \u0060UpdatedBy\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060."
},
"columnNameUpdatedDate": {
"type": "string",
"title": "The column name for the \u0060UpdatedDate\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060."
},
"columnNameDeletedBy": {
"type": "string",
"title": "The column name for the \u0060DeletedBy\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060."
},
"columnNameDeletedDate": {
"type": "string",
"title": "The column name for the \u0060DeletedDate\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060."
},
"storedProcedures": {
"type": "array",
"title": "The corresponding \u0060StoredProcedure\u0060 collection.",
"items": {
"$ref": "#/definitions/StoredProcedure"
}
},
"relationships": {
"type": "array",
"title": "The corresponding Entity Frameworrk (EF) \u0060Relationship\u0060 collection.",
"items": {
"$ref": "#/definitions/Relationship"
}
}
},
"required": [
"name"
]
},
"StoredProcedure": {
"type": "object",
"title": "\u0027StoredProcedure\u0027 object (database-driven)",
"description": "The code generation for an \u0060StoredProcedure\u0060 is primarily driven by the \u0060Type\u0060 property. This encourages (enforces) a consistent implementation for the standardised **CRUD** (Create, Read, Update and Delete) actions, as well as supporting \u0060Upsert\u0060, \u0060Merge\u0060 and ad-hoc queries as required.",
"properties": {
"name": {
"type": "string",
"title": "The name of the \u0060StoredProcedure\u0060; generally the verb/action, i.e. \u0060Get\u0060, \u0060Update\u0060, etc.",
"description": "See \u0060StoredProcedureName\u0060 for the actual name used in the database."
},
"type": {
"type": "string",
"title": "The stored procedure operation type.",
"description": "Defaults to \u0060GetColl\u0060.",
"enum": [
"Get",
"GetColl",
"Create",
"Update",
"Upsert",
"Delete",
"Merge"
]
},
"paging": {
"type": "boolean",
"title": "Indicates whether standardized paging support should be added.",
"description": "This only applies where the stored procedure operation \u0060Type\u0060 is \u0060GetColl\u0060."
},
"storedProcedureName": {
"type": "string",
"title": "The \u0060StoredProcedure\u0060 name in the database.",
"description": "Defaults to \u0060sp\u0060 \u002B \u0060Table.Name\u0060 \u002B \u0060Name\u0060; e.g. \u0060spTableName\u0060 or \u0060spPersonGet\u0060."
},
"replace": {
"type": "boolean",
"title": "Indicates whether the existing \u0060StoredProcedure\u0060 database object should be replaced/altered or whether the object is dropped and recreated.",
"description": "Defaults to \u0060CodeGeneration.Replace\u0060."
},
"reselectStatement": {
"type": "string",
"title": "The SQL statement to perform the reselect after a \u0060Create\u0060, \u0060Update\u0060 or \u0060Upsert\u0060 stored procedure operation \u0060Type\u0060.",
"description": "Defaults to \u0060[{{Table.Schema}}].[sp{{Table.Name}}Get]\u0060 passing the primary key column(s)."
},
"intoTempTable": {
"type": "boolean",
"title": "Indicates whether to select into a \u0060#TempTable\u0060 to allow other statements access to the selected data.",
"description": "A \u0060Select * from #TempTable\u0060 is also performed (code-generated) where the stored procedure operation \u0060Type\u0060 is \u0060GetColl\u0060."
},
"withHints": {
"type": "string",
"title": "the table hints using the SQL Server \u0060WITH()\u0060 statement; the value specified will be used as-is; e.g. \u0060NOLOCK\u0060 will result in \u0060WITH(NOLOCK)\u0060."
},
"collectionType": {
"type": "string",
"title": "The collection type.",
"description": "Values are \u0060JSON\u0060 being a JSON array (preferred) or \u0060UDT\u0060 for a User-Defined Type (legacy). Defaults to \u0060Table.CollectionType\u0060.",
"enum": [
"JSON",
"UDT"
]
},
"mergeOverrideIdentityColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names to be used in the \u0060Merge\u0060 statement to determine whether to _insert_, _update_ or _delete_.",
"description": "This is used to override the default behaviour of using the primary key column(s).",
"items": {
"type": "string"
}
},
"permission": {
"type": "string",
"title": "The name of the \u0060StoredProcedure\u0060 in the database."
},
"orgUnitImmutable": {
"type": "boolean",
"title": "Indicates whether the \u0060OrgUnitId\u0060 column is considered immutable, in that it can not be changed once set.",
"description": "Defaults to \u0060Table.OrgUnitImmutable\u0060."
},
"includeColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names to be included in the underlying generated _settable_ output (further filters \u0060Table.IncludeColumns\u0060).",
"description": "Where not specified this indicates that all \u0060Columns\u0060 are to be included. Only filters the columns where \u0060Type\u0060 is \u0060Get\u0060, \u0060GetColl\u0060, \u0060Create\u0060, \u0060Update\u0060 or \u0060Upsert\u0060.",
"items": {
"type": "string"
}
},
"excludeColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names to be excluded from the underlying generated _settable_ output (further filters \u0060Table.ExcludeColumns\u0060).",
"description": "Where not specified this indicates no \u0060Columns\u0060 are to be excluded. Only filters the columns where \u0060Type\u0060 is \u0060Get\u0060, \u0060GetColl\u0060, \u0060Create\u0060, \u0060Update\u0060 or \u0060Upsert\u0060.",
"items": {
"type": "string"
}
},
"parameters": {
"type": "array",
"title": "The corresponding \u0060Parameter\u0060 collection.",
"items": {
"$ref": "#/definitions/Parameter"
}
},
"where": {
"type": "array",
"title": "The corresponding \u0060Where\u0060 collection.",
"items": {
"$ref": "#/definitions/Where"
}
},
"orderby": {
"type": "array",
"title": "The corresponding \u0060OrderBy\u0060 collection.",
"items": {
"$ref": "#/definitions/OrderBy"
}
},
"execute": {
"type": "array",
"title": "The corresponding \u0060Execute\u0060 collection.",
"items": {
"$ref": "#/definitions/Execute"
}
}
},
"required": [
"name"
]
},
"Parameter": {
"type": "object",
"title": "\u0027Parameter\u0027 object (database-driven)",
"description": "The \u0060Parameter\u0060 is used to define a stored procedure parameter and its charateristics. These are in addition to those that are automatically inferred (added) by the selected \u0060StoredProcedure.Type\u0060.",
"properties": {
"name": {
"type": "string",
"title": "The parameter name (without the \u0060@\u0060 prefix)."
},
"column": {
"type": "string",
"title": "The corresponding column name; used to infer characteristics.",
"description": "Defaults to \u0060Name\u0060."
},
"sqlType": {
"type": "string",
"title": "The SQL type definition (overrides inherited Column definition) including length/precision/scale."
},
"nullable": {
"type": "boolean",
"title": "Indicates whether the parameter is nullable.",
"description": "Note that when the parameter value is \u0060NULL\u0060 it will not be included in the query."
},
"treatColumnNullAs": {
"type": "boolean",
"title": "Indicates whether the column value where NULL should be treated as the specified value; results in: \u0060ISNULL([x].[col], value)\u0060."
},
"collection": {
"type": "boolean",
"title": "Indicates whether the parameter is a collection (one or more values to be included \u0060IN\u0060 the query)."
},
"collectionType": {
"type": "string",
"title": "The collection type.",
"description": "Values are \u0060JSON\u0060 being a JSON array (preferred) or \u0060UDT\u0060 for a User-Defined Type (legacy). Defaults to \u0060StoredProcedure.CollectionType\u0060.",
"enum": [
"JSON",
"UDT"
]
},
"operator": {
"type": "string",
"title": "The where clause equality operator",
"description": "Defaults to \u0060EQ\u0060.",
"enum": [
"EQ",
"NE",
"LT",
"LE",
"GT",
"GE",
"LIKE"
]
}
},
"required": [
"name"
]
},
"Where": {
"type": "object",
"title": "\u0027Where\u0027 object (database-driven)",
"description": "The \u0060Where\u0060 object defines an additional where \u0060Statement\u0060 to be added. This is in addition to those automatically added based on the \u0060StoredProcedure.Type\u0060.",
"properties": {
"statement": {
"type": "string",
"title": "The where statement (TSQL)."
}
},
"required": [
"statement"
]
},
"OrderBy": {
"type": "object",
"title": "\u0027OrderBy\u0027 object (database-driven)",
"description": "The \u0060OrderBy\u0060 object defines the query order. Only valid for \u0060StoredProcedure.Type\u0060 of \u0060GetAll\u0060.",
"properties": {
"name": {
"type": "string",
"title": "The name of the \u0060Column\u0060 to order by."
},
"order": {
"type": "string",
"title": "The corresponding sort order.",
"description": "Defaults to \u0060Ascending\u0060.",
"enum": [
"Ascending",
"Descending"
]
}
},
"required": [
"name"
]
},
"Execute": {
"type": "object",
"title": "\u0027Execute\u0027 object (database-driven)",
"description": "The _Execute_ object enables additional TSQL statements to be embedded within the stored procedure.",
"properties": {
"statement": {
"type": "string",
"title": "The additional TSQL statement."
},
"location": {
"type": "string",
"title": "The location of the statement in relation to the underlying primary stored procedure statement.",
"description": "Defaults to \u0060After\u0060.",
"enum": [
"Before",
"After"
]
}
},
"required": [
"statement"
]
},
"Relationship": {
"type": "object",
"title": "\u0027Relationship\u0027 object (database-driven)",
"description": "The \u0060Relationship\u0060 object enables the definition of an entity framework (EF) model relationship.",
"properties": {
"name": {
"type": "string",
"title": "The name of the primary table of the query."
},
"schema": {
"type": "string",
"title": "The schema name of the primary table of the view.",
"description": "Defaults to \u0060CodeGeneration.Schema\u0060."
},
"type": {
"type": "string",
"title": "The relationship type between the parent and child (self).",
"description": "Defaults to \u0060OneToMany\u0060.",
"enum": [
"OneToMany",
"ManyToOne"
]
},
"foreignKeyColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names from the related table that reference the parent.",
"items": {
"type": "string"
}
},
"principalKeyColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names from the principal table that reference the child.",
"description": " Typically this is only used where referencing property(s) other than the primary key as the principal property(s).",
"items": {
"type": "string"
}
},
"onDelete": {
"type": "string",
"title": "The operation applied to dependent entities in the relationship when the principal is deleted or the relationship is severed.",
"description": "Defaults to \u0060NoAction\u0060. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.deletebehavior for more information.",
"enum": [
"NoAction",
"Cascade",
"ClientCascade",
"ClientNoAction",
"ClientSetNull",
"Restrict",
"SetNull"
]
},
"autoInclude": {
"type": "boolean",
"title": "Indicates whether to automatically include navigation to the property.",
"description": "Defaults to \u0060false\u0060."
},
"propertyName": {
"type": "string",
"title": "The corresponding property name within the entity framework (EF) model.",
"description": "Defaults to \u0060Name\u0060 using the \u0060CodeGeneration.AutoDotNetRename\u0060 option."
},
"efModelName": {
"type": "string",
"title": "The corresponding entity framework (EF) model name (.NET Type).",
"description": "Defaults to \u0060Name\u0060 using the \u0060CodeGeneration.AutoDotNetRename\u0060 option."
}
},
"required": [
"name"
]
},
"Query": {
"type": "object",
"title": "\u0027Query\u0027 object (database-driven)",
"description": "The \u0060Query\u0060 object enables the definition of more complex multi-table queries (\u0060Joins\u0060) that would primarily result in a database _View_. The primary table \u0060Name\u0060 for the query is required to be specified. Multiple queries can be specified for the same table(s). The \u0060IncludeColumns\u0060 and \u0060ExcludeColumns\u0060 provide a shorthand to include or exclude selected columns; with the \u0060AliasColumns\u0060 providing a means to rename where required (for example duplicate name). Additional \u0060Where\u0060 and \u0060Order\u0060 configuration can also be added as required.",
"properties": {
"name": {
"type": "string",
"title": "The name of the primary table of the query."
},
"schema": {
"type": "string",
"title": "The schema name of the primary table of the view.",
"description": "Defaults to \u0060CodeGeneration.Schema\u0060."
},
"alias": {
"type": "string",
"title": "The \u0060Schema.Table\u0060 alias name.",
"description": "Will automatically default where not specified."
},
"includeColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names to be included in the underlying generated output.",
"description": "Where not specified this indicates that all \u0060Columns\u0060 are to be included.",
"items": {
"type": "string"
}
},
"excludeColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names to be excluded from the underlying generated output.",
"description": "Where not specified this indicates no \u0060Columns\u0060 are to be excluded.",
"items": {
"type": "string"
}
},
"aliasColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 and \u0060Alias\u0060 pairs (split by a \u0060^\u0060 lookup character) to enable column aliasing/renaming.",
"description": "Each alias value should be formatted as \u0060Column\u0060 \u002B \u0060^\u0060 \u002B \u0060Alias\u0060; e.g. \u0060PCODE^ProductCode\u0060",
"items": {
"type": "string"
}
},
"view": {
"type": "boolean",
"title": "Indicates whether a \u0060View\u0060 is to be generated."
},
"viewName": {
"type": "string",
"title": "The \u0060View\u0060 name.",
"description": "Defaults to \u0060vw\u0060 \u002B \u0060Name\u0060; e.g. \u0060vwTableName\u0060."
},
"viewSchema": {
"type": "string",
"title": "The schema name for the \u0060View\u0060.",
"description": "Defaults to \u0060Schema\u0060."
},
"viewReplace": {
"type": "boolean",
"title": "Indicates whether the existing \u0060View\u0060 database object should be replaced/altered or whether the object is dropped and recreated.",
"description": "Defaults to \u0060CodeGeneration.Replace\u0060."
},
"permission": {
"type": "string",
"title": "The permission to be used for security permission checking.",
"description": "The suffix is optional, and where not specified will default to \u0060.READ\u0060."
},
"columnNameIsDeleted": {
"type": "string",
"title": "The column name for the \u0060IsDeleted\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.IsDeleted\u0060."
},
"columnNameTenantId": {
"type": "string",
"title": "The column name for the \u0060TenantId\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.TenantId\u0060."
},
"columnNameOrgUnitId": {
"type": "string",
"title": "The column name for the \u0060OrgUnitId\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.OrgUnitId\u0060."
},
"columnNameRowVersion": {
"type": "string",
"title": "The column name for the \u0060RowVersion\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.RowVersion\u0060."
},
"columnNameCreatedBy": {
"type": "string",
"title": "The column name for the \u0060CreatedBy\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.CreatedBy\u0060."
},
"columnNameCreatedDate": {
"type": "string",
"title": "The column name for the \u0060CreatedDate\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.CreatedDate\u0060."
},
"columnNameUpdatedBy": {
"type": "string",
"title": "The column name for the \u0060UpdatedBy\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060."
},
"columnNameUpdatedDate": {
"type": "string",
"title": "The column name for the \u0060UpdatedDate\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060."
},
"columnNameDeletedBy": {
"type": "string",
"title": "The column name for the \u0060DeletedBy\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060."
},
"columnNameDeletedDate": {
"type": "string",
"title": "The column name for the \u0060DeletedDate\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060."
},
"joins": {
"type": "array",
"title": "The corresponding \u0060Join\u0060 collection.",
"items": {
"$ref": "#/definitions/QueryJoin"
}
},
"order": {
"type": "array",
"title": "The corresponding \u0060Order\u0060 collection.",
"items": {
"$ref": "#/definitions/QueryOrder"
}
},
"where": {
"type": "array",
"title": "The corresponding \u0060Where\u0060 collection.",
"items": {
"$ref": "#/definitions/QueryWhere"
}
}
},
"required": [
"name"
]
},
"QueryJoin": {
"type": "object",
"title": "\u0027QueryJoin\u0027 object (database-driven)",
"description": "The \u0060QueryJoin\u0060 object defines a join to another (or same) table within a query. The \u0060Type\u0060 defines the join type, such as inner join, etc. The \u0060IncludeColumns\u0060 and \u0060ExcludeColumns\u0060 provide a shorthand to include or exclude selected columns; with the \u0060AliasColumns\u0060 providing a means to rename where required (for example duplicate name).",
"properties": {
"name": {
"type": "string",
"title": "The name of the table to join."
},
"schema": {
"type": "string",
"title": "The schema name of the table to join.",
"description": "Defaults to \u0060Table.Schema\u0060; i.e. same schema."
},
"alias": {
"type": "string",
"title": "The \u0060Schema.Table\u0060 alias name.",
"description": "Will automatically default where not specified."
},
"type": {
"type": "string",
"title": "The SQL join type.",
"description": "Defaults to \u0060Inner\u0060.",
"enum": [
"Inner",
"Left",
"Right",
"Full"
]
},
"includeColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names to be included in the underlying generated output.",
"description": "Where not specified this indicates that all \u0060Columns\u0060 are to be included.",
"items": {
"type": "string"
}
},
"excludeColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 names to be excluded from the underlying generated output.",
"description": "Where not specified this indicates no \u0060Columns\u0060 are to be excluded.",
"items": {
"type": "string"
}
},
"aliasColumns": {
"type": "array",
"title": "The list of \u0060Column\u0060 and \u0060Alias\u0060 pairs (split by a \u0060^\u0060 lookup character) to enable column renaming.",
"description": "Each alias value should be formatted as \u0060Column\u0060 \u002B \u0060^\u0060 \u002B \u0060Alias\u0060; e.g. \u0060PCODE^ProductCode\u0060",
"items": {
"type": "string"
}
},
"columnNameIsDeleted": {
"type": "string",
"title": "The column name for the \u0060IsDeleted\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.IsDeleted\u0060."
},
"columnNameTenantId": {
"type": "string",
"title": "The column name for the \u0060TenantId\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.TenantId\u0060."
},
"columnNameOrgUnitId": {
"type": "string",
"title": "The column name for the \u0060OrgUnitId\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.OrgUnitId\u0060."
},
"columnNameRowVersion": {
"type": "string",
"title": "The column name for the \u0060RowVersion\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.RowVersion\u0060."
},
"columnNameCreatedBy": {
"type": "string",
"title": "The column name for the \u0060CreatedBy\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.CreatedBy\u0060."
},
"columnNameCreatedDate": {
"type": "string",
"title": "The column name for the \u0060CreatedDate\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.CreatedDate\u0060."
},
"columnNameUpdatedBy": {
"type": "string",
"title": "The column name for the \u0060UpdatedBy\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060."
},
"columnNameUpdatedDate": {
"type": "string",
"title": "The column name for the \u0060UpdatedDate\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060."
},
"columnNameDeletedBy": {
"type": "string",
"title": "The column name for the \u0060DeletedBy\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedBy\u0060."
},
"columnNameDeletedDate": {
"type": "string",
"title": "The column name for the \u0060DeletedDate\u0060 capability.",
"description": "Defaults to \u0060CodeGeneration.UpdatedDate\u0060."
},
"on": {
"type": "array",
"title": "The corresponding \u0060JoinOn\u0060 collection.",
"items": {
"$ref": "#/definitions/QueryJoinOn"
}
}
},
"required": [
"name"
]
},
"QueryJoinOn": {
"type": "object",
"title": "\u0027QueryJoinOn\u0027 object (database-driven)",
"description": "The \u0060QueryJoinOn\u0060 object defines the join on characteristics for a join within a query.",