foxhound 2.0.9 → 2.0.11

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.
@@ -91,7 +91,7 @@ suite
91
91
  // This is the query generated by the MSSQL dialect
92
92
  _Fable.log.trace('Create Query', tmpQuery.query);
93
93
  Expect(tmpQuery.query.body)
94
- .to.equal("INSERT INTO Animal ( IDAnimal, Name, Age) VALUES ( @IDAnimal_0, @Name_1, @Age_2);");
94
+ .to.equal("INSERT INTO [Animal] ( [IDAnimal], [Name], [Age]) VALUES ( @IDAnimal_0, @Name_1, @Age_2);");
95
95
  }
96
96
  );
97
97
  test
@@ -122,7 +122,7 @@ suite
122
122
  // This is the query generated by the MSSQL dialect
123
123
  _Fable.log.trace('Simple Select Query', tmpQuery.query);
124
124
  Expect(tmpQuery.query.body)
125
- .to.equal('SELECT Animal.* FROM Animal ORDER BY Cost DESC;');
125
+ .to.equal('SELECT [Animal].* FROM [Animal] ORDER BY [Cost] DESC;');
126
126
  }
127
127
  );
128
128
  test
@@ -138,7 +138,7 @@ suite
138
138
  // This is the query generated by the MSSQL dialect
139
139
  _Fable.log.trace('Simple Select Query', tmpQuery.query);
140
140
  Expect(tmpQuery.query.body)
141
- .to.equal('SELECT Animal.* FROM Animal WITH(INDEX(AnimalIndex_1)) ORDER BY Cost DESC;');
141
+ .to.equal('SELECT [Animal].* FROM [Animal] WITH(INDEX(AnimalIndex_1)) ORDER BY [Cost] DESC;');
142
142
  }
143
143
  );
144
144
  test
@@ -154,7 +154,7 @@ suite
154
154
  // This is the query generated by the MSSQL dialect
155
155
  _Fable.log.trace('Simple Select Query', tmpQuery.query);
156
156
  Expect(tmpQuery.query.body)
157
- .to.equal('SELECT DISTINCT Animal.* FROM Animal ORDER BY Cost DESC;');
157
+ .to.equal('SELECT DISTINCT [Animal].* FROM [Animal] ORDER BY [Cost] DESC;');
158
158
  }
159
159
  );
160
160
  test
@@ -176,7 +176,7 @@ suite
176
176
  // This is the query generated by the MSSQL dialect
177
177
  _Fable.log.trace('Select Query', tmpQuery.query);
178
178
  Expect(tmpQuery.query.body)
179
- .to.equal('SELECT Name, Age, Cost FROM Animal WHERE Age = @Age_w0 ORDER BY Age, Cost OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
179
+ .to.equal('SELECT [Name], [Age], [Cost] FROM [Animal] WHERE [Age] = @Age_w0 ORDER BY [Age], [Cost] OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
180
180
  );
181
181
  test
182
182
  (
@@ -188,7 +188,7 @@ suite
188
188
  .setScope('Animal')
189
189
  .setCap(10)
190
190
  .setBegin(0)
191
- .setDataElements(['*', 'Name', 'Age', 'Cost', 'Animal.*'])
191
+ .setDataElements(['*', 'Name', 'Age', 'Cost', '[Animal].*'])
192
192
  .setSort([{Column:'Age',Direction:'Ascending'}])
193
193
  .setFilter({Column:'Age',Operator:'=',Value:'15',Connector:'AND',Parameter:'Age'});
194
194
  tmpQuery.addSort('Cost');
@@ -197,7 +197,7 @@ suite
197
197
  // This is the query generated by the MSSQL dialect
198
198
  _Fable.log.trace('Select Query', tmpQuery.query);
199
199
  Expect(tmpQuery.query.body)
200
- .to.equal('SELECT *, Name, Age, Cost, Animal.* FROM Animal WHERE Age = @Age_w0 ORDER BY Age, Cost OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
200
+ .to.equal('SELECT *, [Name], [Age], [Cost], [Animal].* FROM [Animal] WHERE [Age] = @Age_w0 ORDER BY [Age], [Cost] OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
201
201
  );
202
202
  test
203
203
  (
@@ -222,7 +222,7 @@ suite
222
222
  // This is the query generated by the MSSQL dialect
223
223
  _Fable.log.trace('Select Query', tmpQuery.query);
224
224
  Expect(tmpQuery.query.body)
225
- .to.equal('SELECT Name, Age, Cost FROM Animal WHERE Age = @Age_w0 AND ( Color = @Color_w2 OR Color = @Color_w3 ) AND Description IS NOT NULL AND IDOffice IN ( @IDOffice_w6 ) ORDER BY Age OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY;');
225
+ .to.equal('SELECT [Name], [Age], [Cost] FROM [Animal] WHERE [Age] = @Age_w0 AND ( [Color] = @Color_w2 OR [Color] = @Color_w3 ) AND [Description] IS NOT NULL AND [IDOffice] IN ( @IDOffice_w6 ) ORDER BY [Age] OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY;');
226
226
  }
227
227
  );
228
228
  test
@@ -244,7 +244,7 @@ suite
244
244
  // This is the query generated by the MSSQL dialect
245
245
  _Fable.log.trace('Custom Select Query', tmpQuery.query);
246
246
  Expect(tmpQuery.query.body)
247
- .to.equal('SELECT Name, Age * 5, Cost FROM Animal WHERE Age = @Age_w0 OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
247
+ .to.equal('SELECT Name, Age * 5, Cost FROM [Animal] WHERE [Age] = @Age_w0 OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
248
248
  );
249
249
  test
250
250
  (
@@ -266,7 +266,7 @@ suite
266
266
  // This is the query generated by the MSSQL dialect
267
267
  _Fable.log.trace('Custom Select Query', tmpQuery.query);
268
268
  Expect(tmpQuery.query.body)
269
- .to.equal('SELECT Name, Age * 5, Cost FROM Animal WHERE Age = @Age_w0 OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
269
+ .to.equal('SELECT Name, Age * 5, Cost FROM [Animal] WHERE [Age] = @Age_w0 OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
270
270
  );
271
271
  test
272
272
  (
@@ -323,7 +323,7 @@ suite
323
323
  // This is the query generated by the MSSQL dialect
324
324
  _Fable.log.trace('Custom Count Query', tmpQuery.query);
325
325
  Expect(tmpQuery.query.body)
326
- .to.equal('SELECT COUNT(*) AS RowCount FROM Animal WHERE Age = @Age_w0;');
326
+ .to.equal('SELECT COUNT(*) AS RowCount FROM [Animal] WHERE [Age] = @Age_w0;');
327
327
  }
328
328
  );
329
329
  test
@@ -342,7 +342,7 @@ suite
342
342
  // This is the query generated by the MSSQL dialect
343
343
  _Fable.log.trace('Custom Count Query', tmpQuery.query);
344
344
  Expect(tmpQuery.query.body)
345
- .to.equal('SELECT COUNT(*) AS RowCount FROM Animal WITH(INDEX(AnimalIndex_1)) WHERE Age = @Age_w0;');
345
+ .to.equal('SELECT COUNT(*) AS RowCount FROM [Animal] WITH(INDEX(AnimalIndex_1)) WHERE [Age] = @Age_w0;');
346
346
  }
347
347
  );
348
348
  test
@@ -361,7 +361,7 @@ suite
361
361
  // This is the query generated by the MSSQL dialect
362
362
  _Fable.log.trace('Custom Count Query', tmpQuery.query);
363
363
  Expect(tmpQuery.query.body)
364
- .to.equal('SELECT COUNT(*) AS RowCount FROM Animal WHERE Age = @Age_w0;');
364
+ .to.equal('SELECT COUNT(*) AS RowCount FROM [Animal] WHERE [Age] = @Age_w0;');
365
365
  }
366
366
  );
367
367
  test
@@ -380,7 +380,7 @@ suite
380
380
  // This is the query generated by the MSSQL dialect
381
381
  _Fable.log.trace('Update Query', tmpQuery.query);
382
382
  Expect(tmpQuery.query.body)
383
- .to.equal('UPDATE Animal SET Age = @Age_0, Color = @Color_1 WHERE IDAnimal = @IDAnimal_w0;');
383
+ .to.equal('UPDATE [Animal] SET [Age] = @Age_0, [Color] = @Color_1 WHERE [IDAnimal] = @IDAnimal_w0;');
384
384
  }
385
385
  );
386
386
  test
@@ -414,7 +414,7 @@ suite
414
414
  // This is the query generated by the MSSQL dialect
415
415
  _Fable.log.trace('Delete Query', tmpQuery.query);
416
416
  Expect(tmpQuery.query.body)
417
- .to.equal('DELETE FROM Animal WHERE IDAnimal = @IDAnimal_w0;');
417
+ .to.equal('DELETE FROM [Animal] WHERE [IDAnimal] = @IDAnimal_w0;');
418
418
  }
419
419
  );
420
420
  test
@@ -432,7 +432,7 @@ suite
432
432
  // This is the query generated by the MSSQL dialect
433
433
  _Fable.log.trace('Count Query', tmpQuery.query);
434
434
  Expect(tmpQuery.query.body)
435
- .to.equal('SELECT COUNT(*) AS Row_Count FROM Animal WITH(INDEX(AnimalIndex_1));');
435
+ .to.equal('SELECT COUNT(*) AS Row_Count FROM [Animal] WITH(INDEX(AnimalIndex_1));');
436
436
  }
437
437
  );
438
438
  test
@@ -452,7 +452,7 @@ suite
452
452
  _Fable.log.trace('Count Distinct Query', tmpQuery.query);
453
453
  Expect(tmpQuery.query.body)
454
454
  // RowCount is a reserved word for MSSQL so we need to change it to Row_Count
455
- .to.equal('SELECT COUNT(DISTINCT Animal.IDAnimal) AS Row_Count FROM Animal WHERE Animal.Deleted = @Deleted_w0;');
455
+ .to.equal('SELECT COUNT(DISTINCT [IDAnimal]) AS Row_Count FROM [Animal] WHERE [Deleted] = @Deleted_w0;');
456
456
  }
457
457
  );
458
458
  test
@@ -470,7 +470,7 @@ suite
470
470
  // This is the query generated by the MSSQL dialect
471
471
  _Fable.log.trace('Count Distinct Query', tmpQuery.query);
472
472
  Expect(tmpQuery.query.body)
473
- .to.equal('SELECT COUNT(*) AS Row_Count FROM Animal;');
473
+ .to.equal('SELECT COUNT(*) AS Row_Count FROM [Animal];');
474
474
  }
475
475
  );
476
476
  test
@@ -489,7 +489,7 @@ suite
489
489
  // This is the query generated by the MSSQL dialect
490
490
  _Fable.log.trace('Count Distinct Query', tmpQuery.query);
491
491
  Expect(tmpQuery.query.body)
492
- .to.equal('SELECT COUNT(DISTINCT Name) AS Row_Count FROM Animal;');
492
+ .to.equal('SELECT COUNT(DISTINCT [Name]) AS Row_Count FROM [Animal];');
493
493
  }
494
494
  );
495
495
  }
@@ -529,7 +529,7 @@ suite
529
529
  // This is the query generated by the MSSQL dialect
530
530
  _Fable.log.trace('Create Query', tmpQuery.query);
531
531
  Expect(tmpQuery.query.body)
532
- .to.equal("INSERT INTO Animal ( GUIDAnimal, CreateDate, CreatingIDUser, UpdateDate, UpdatingIDUser, Deleted, Name, Age) VALUES ( @GUIDAnimal_1, GETUTCDATE(), @CreatingIDUser_3, GETUTCDATE(), @UpdatingIDUser_5, @Deleted_6, @Name_7, @Age_8);");
532
+ .to.equal("INSERT INTO [Animal] ( [GUIDAnimal], [CreateDate], [CreatingIDUser], [UpdateDate], [UpdatingIDUser], [Deleted], [Name], [Age]) VALUES ( @GUIDAnimal_1, GETUTCDATE(), @CreatingIDUser_3, GETUTCDATE(), @UpdatingIDUser_5, @Deleted_6, @Name_7, @Age_8);");
533
533
  }
534
534
  );
535
535
  test
@@ -561,7 +561,7 @@ suite
561
561
  // This is the query generated by the MSSQL dialect
562
562
  _Fable.log.trace('Create Query', tmpQuery.query);
563
563
  Expect(tmpQuery.query.body)
564
- .to.equal("INSERT INTO Animal ( GUIDAnimal, CreateDate, CreatingIDUser, UpdateDate, UpdatingIDUser, Deleted, Name, Age) VALUES ( @GUIDAnimal_1, GETUTCDATE(), @CreatingIDUser_3, GETUTCDATE(), @UpdatingIDUser_5, @Deleted_6, @Name_7, @Age_8);");
564
+ .to.equal("INSERT INTO [Animal] ( [GUIDAnimal], [CreateDate], [CreatingIDUser], [UpdateDate], [UpdatingIDUser], [Deleted], [Name], [Age]) VALUES ( @GUIDAnimal_1, GETUTCDATE(), @CreatingIDUser_3, GETUTCDATE(), @UpdatingIDUser_5, @Deleted_6, @Name_7, @Age_8);");
565
565
  }
566
566
  );
567
567
  test
@@ -597,7 +597,7 @@ suite
597
597
  // This is the query generated by the MSSQL dialect
598
598
  _Fable.log.trace('Create Query (AutoIdentity disabled)', tmpQuery.query);
599
599
  Expect(tmpQuery.query.body)
600
- .to.equal("INSERT INTO Animal ( IDAnimal, GUIDAnimal, CreateDate, CreatingIDUser, UpdateDate, UpdatingIDUser, Deleted, DeletingIDUser, DeleteDate, Name, Age) VALUES ( @IDAnimal_0, @GUIDAnimal_1, @CreateDate_2, @CreatingIDUser_3, @UpdateDate_4, @UpdatingIDUser_5, @Deleted_6, @DeletingIDUser_7, @DeleteDate_8, @Name_9, @Age_10);");
600
+ .to.equal("INSERT INTO [Animal] ( [IDAnimal], [GUIDAnimal], [CreateDate], [CreatingIDUser], [UpdateDate], [UpdatingIDUser], [Deleted], [DeletingIDUser], [DeleteDate], [Name], [Age]) VALUES ( @IDAnimal_0, @GUIDAnimal_1, @CreateDate_2, @CreatingIDUser_3, @UpdateDate_4, @UpdatingIDUser_5, @Deleted_6, @DeletingIDUser_7, @DeleteDate_8, @Name_9, @Age_10);");
601
601
  }
602
602
  );
603
603
  test
@@ -618,7 +618,7 @@ suite
618
618
  // This is the query generated by the MSSQL dialect
619
619
  _Fable.log.trace('Select Query', tmpQuery.query);
620
620
  Expect(tmpQuery.query.body)
621
- .to.equal('SELECT Name, Age, Cost FROM Animal WHERE Animal.Deleted = @Deleted_w0 OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY;');
621
+ .to.equal('SELECT [Name], [Age], [Cost] FROM [Animal] WHERE [Deleted] = @Deleted_w0 OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY;');
622
622
  }
623
623
  );
624
624
  test
@@ -640,7 +640,7 @@ suite
640
640
  // This is the query generated by the MSSQL dialect
641
641
  _Fable.log.trace('Select Query', tmpQuery.query);
642
642
  Expect(tmpQuery.query.body)
643
- .to.equal('SELECT DISTINCT Name, Age, Cost FROM Animal WHERE Animal.Deleted = @Deleted_w0 OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY;');
643
+ .to.equal('SELECT DISTINCT [Name], [Age], [Cost] FROM [Animal] WHERE [Deleted] = @Deleted_w0 OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY;');
644
644
  }
645
645
  );
646
646
  test
@@ -669,7 +669,7 @@ suite
669
669
  // This is the query generated by the MSSQL dialect
670
670
  _Fable.log.trace('Select Query', tmpQuery.query);
671
671
  Expect(tmpQuery.query.body)
672
- .to.equal('SELECT Name, Age, Cost FROM Animal WHERE Age = @Age_w0 AND ( Color = @Color_w2 OR Color = @Color_w3 ) AND Description IS NOT NULL AND IDOffice IN ( @IDOffice_w6 ) AND Deleted = @Deleted_w7 OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY;');
672
+ .to.equal('SELECT [Name], [Age], [Cost] FROM [Animal] WHERE [Age] = @Age_w0 AND ( [Color] = @Color_w2 OR [Color] = @Color_w3 ) AND [Description] IS NOT NULL AND [IDOffice] IN ( @IDOffice_w6 ) AND [Deleted] = @Deleted_w7 OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY;');
673
673
  }
674
674
  );
675
675
  test
@@ -691,7 +691,7 @@ suite
691
691
  // This is the query generated by the MSSQL dialect
692
692
  _Fable.log.trace('Select Query', tmpQuery.query);
693
693
  Expect(tmpQuery.query.body)
694
- .to.equal('SELECT Name, Age, Cost FROM Animal OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY;');
694
+ .to.equal('SELECT [Name], [Age], [Cost] FROM [Animal] OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY;');
695
695
  }
696
696
  );
697
697
  test
@@ -712,7 +712,7 @@ suite
712
712
  // This is the query generated by the MSSQL dialect
713
713
  _Fable.log.trace('Delete Query', tmpQuery.query);
714
714
  Expect(tmpQuery.query.body)
715
- .to.equal('UPDATE Animal SET UpdateDate = GETUTCDATE(), Deleted = 1, DeletingIDUser = @DeletingIDUser_2, DeleteDate = GETUTCDATE() WHERE IDAnimal = @IDAnimal_w0 AND Animal.Deleted = @Deleted_w1;');
715
+ .to.equal('UPDATE [Animal] SET [UpdateDate] = GETUTCDATE(), [Deleted] = 1, [DeletingIDUser] = @DeletingIDUser_2, [DeleteDate] = GETUTCDATE() WHERE [IDAnimal] = @IDAnimal_w0 AND [Deleted] = @Deleted_w1;');
716
716
  }
717
717
  );
718
718
  test
@@ -740,7 +740,7 @@ suite
740
740
  // This is the query generated by the MSSQL dialect
741
741
  _Fable.log.trace('Update Query', tmpQuery.query);
742
742
  Expect(tmpQuery.query.body)
743
- .to.equal('UPDATE Animal SET GUIDAnimal = @GUIDAnimal_0, UpdateDate = GETUTCDATE(), UpdatingIDUser = @UpdatingIDUser_2, Name = @Name_3, Age = @Age_4 WHERE IDAnimal = @IDAnimal_w0;');
743
+ .to.equal('UPDATE [Animal] SET [GUIDAnimal] = @GUIDAnimal_0, [UpdateDate] = GETUTCDATE(), [UpdatingIDUser] = @UpdatingIDUser_2, [Name] = @Name_3, [Age] = @Age_4 WHERE [IDAnimal] = @IDAnimal_w0;');
744
744
  }
745
745
  );
746
746
  test
@@ -770,7 +770,7 @@ suite
770
770
  // This is the query generated by the MSSQL dialect
771
771
  _Fable.log.trace('Update Query', tmpQuery.query);
772
772
  Expect(tmpQuery.query.body)
773
- .to.equal('UPDATE Animal SET GUIDAnimal = @GUIDAnimal_0, Name = @Name_1, Age = @Age_2 WHERE IDAnimal = @IDAnimal_w0;');
773
+ .to.equal('UPDATE [Animal] SET [GUIDAnimal] = @GUIDAnimal_0, [Name] = @Name_1, [Age] = @Age_2 WHERE [IDAnimal] = @IDAnimal_w0;');
774
774
  }
775
775
  );
776
776
  test
@@ -792,7 +792,7 @@ suite
792
792
  // This is the query generated by the MSSQL dialect
793
793
  _Fable.log.trace('Delete Query', tmpQuery.query);
794
794
  Expect(tmpQuery.query.body)
795
- .to.equal('DELETE FROM Animal WHERE IDAnimal = @IDAnimal_w0;');
795
+ .to.equal('DELETE FROM [Animal] WHERE [IDAnimal] = @IDAnimal_w0;');
796
796
  }
797
797
  );
798
798
  test
@@ -824,7 +824,7 @@ suite
824
824
  // This is the query generated by the MSSQL dialect
825
825
  _Fable.log.trace('Update Query', tmpQuery.query);
826
826
  Expect(tmpQuery.query.body)
827
- .to.equal('UPDATE Animal SET GUIDAnimal = @GUIDAnimal_0, UpdateDate = GETUTCDATE(), UpdatingIDUser = @UpdatingIDUser_2, Deleted = @Deleted_3, Name = @Name_4, Age = @Age_5 WHERE IDAnimal = @IDAnimal_w0 AND Deleted = @Deleted_w1;');
827
+ .to.equal('UPDATE [Animal] SET [GUIDAnimal] = @GUIDAnimal_0, [UpdateDate] = GETUTCDATE(), [UpdatingIDUser] = @UpdatingIDUser_2, [Deleted] = @Deleted_3, [Name] = @Name_4, [Age] = @Age_5 WHERE [IDAnimal] = @IDAnimal_w0 AND [Deleted] = @Deleted_w1;');
828
828
  }
829
829
  );
830
830
  test
@@ -846,7 +846,7 @@ suite
846
846
  // This is the query generated by the MSSQL dialect
847
847
  _Fable.log.trace('Delete Query', tmpQuery.query);
848
848
  Expect(tmpQuery.query.body)
849
- .to.equal('UPDATE Animal SET UpdateDate = GETUTCDATE(), Deleted = 1, DeletingIDUser = @DeletingIDUser_2, DeleteDate = GETUTCDATE() WHERE IDAnimal = @IDAnimal_w0 AND Animal.Deleted = @Deleted_w1;');
849
+ .to.equal('UPDATE [Animal] SET [UpdateDate] = GETUTCDATE(), [Deleted] = 1, [DeletingIDUser] = @DeletingIDUser_2, [DeleteDate] = GETUTCDATE() WHERE [IDAnimal] = @IDAnimal_w0 AND [Deleted] = @Deleted_w1;');
850
850
  }
851
851
  );
852
852
  test
@@ -869,7 +869,7 @@ suite
869
869
  // This is the query generated by the MSSQL dialect
870
870
  _Fable.log.trace('Delete Query', tmpQuery.query);
871
871
  Expect(tmpQuery.query.body)
872
- .to.equal('DELETE FROM Animal WHERE IDAnimal = @IDAnimal_w0;');
872
+ .to.equal('DELETE FROM [Animal] WHERE [IDAnimal] = @IDAnimal_w0;');
873
873
  }
874
874
  );
875
875
  test
@@ -889,7 +889,7 @@ suite
889
889
  // This is the query generated by the MSSQL dialect
890
890
  _Fable.log.trace('Undelete Query', tmpQuery.query);
891
891
  Expect(tmpQuery.query.body)
892
- .to.equal('UPDATE Animal SET UpdateDate = GETUTCDATE(), UpdatingIDUser = @UpdatingIDUser_1, Deleted = 0 WHERE IDAnimal = @IDAnimal_w0;');
892
+ .to.equal('UPDATE [Animal] SET [UpdateDate] = GETUTCDATE(), [UpdatingIDUser] = @UpdatingIDUser_1, [Deleted] = 0 WHERE [IDAnimal] = @IDAnimal_w0;');
893
893
  }
894
894
  );
895
895
  test
@@ -937,7 +937,7 @@ suite
937
937
  // This is the query generated by the MSSQL dialect
938
938
  _Fable.log.trace('Select Query', tmpQuery.query);
939
939
  Expect(tmpQuery.query.body)
940
- .to.equal('SELECT Name, Age, Cost FROM Animal INNER JOIN Test ON Test.IDAnimal = Animal.IDAnimal WHERE Age = @Age_w0 ORDER BY Age OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
940
+ .to.equal('SELECT [Name], [Age], [Cost] FROM [Animal] INNER JOIN [Test] ON Test.IDAnimal = Animal.IDAnimal WHERE [Age] = @Age_w0 ORDER BY [Age] OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
941
941
  );
942
942
  test
943
943
  (
@@ -960,7 +960,7 @@ suite
960
960
  // This is the query generated by the MSSQL dialect
961
961
  _Fable.log.trace('Select Query', tmpQuery.query);
962
962
  Expect(tmpQuery.query.body)
963
- .to.equal('SELECT DISTINCT Name, Age, Cost FROM Animal INNER JOIN Test ON Test.IDAnimal = Animal.IDAnimal WHERE Age = @Age_w0 ORDER BY Age OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
963
+ .to.equal('SELECT DISTINCT [Name], [Age], [Cost] FROM [Animal] INNER JOIN [Test] ON Test.IDAnimal = Animal.IDAnimal WHERE [Age] = @Age_w0 ORDER BY [Age] OFFSET 0 ROWS FETCH NEXT 10 ROWS ONLY;'); }
964
964
  );
965
965
  test
966
966
  (
@@ -977,7 +977,7 @@ suite
977
977
  // This is the query generated by the MSSQL dialect
978
978
  _Fable.log.trace('Select Query', tmpQuery.query);
979
979
  Expect(tmpQuery.query.body)
980
- .to.equal('SELECT Animal.* FROM Animal;'); //bad join is ignored, warn log is generated
980
+ .to.equal('SELECT [Animal].* FROM [Animal];'); //bad join is ignored, warn log is generated
981
981
  }
982
982
  );
983
983
  }
package/gulpfile.js DELETED
@@ -1,83 +0,0 @@
1
- 'use strict';
2
-
3
- // We aren't abstracting this yet but here's the ... "Config"
4
- const _CONFIG = (
5
- {
6
- // The input source file that should be passed to browserify:
7
- // (if you need to auto-instantiate an object, for instance)
8
- EntrypointInputSourceFile: `${__dirname}/source/Foxhound-Browser-Shim.js`,
9
-
10
- // The name of the packaged object to be passed to browserify:
11
- // (browserify sets this to global scope and window.SOMEOBJECTNAMEHERE where SOMEOBJECTNAMEHERE is the string below)
12
- LibraryObjectName: `Foxhound`,
13
-
14
- // The folder to write the library files and maps out to:
15
- LibraryOutputFolder: `${__dirname}/dist/`,
16
-
17
- // The name of the unminified version of the packaged library, for easy debugging:
18
- LibraryUniminifiedFileName: `foxhound.js`,
19
-
20
- // The name of the minified version of the packaged library, for production release:
21
- LibraryMinifiedFileName: `foxhound.min.js`
22
- });
23
-
24
- // ---> Boilerplate Browser Uglification and Packaging <--- \\
25
-
26
- const libBrowserify = require('browserify');
27
- const libGulp = require('gulp');
28
-
29
- const libVinylSourceStream = require('vinyl-source-stream');
30
- const libVinylBuffer = require('vinyl-buffer');
31
-
32
- const libSourcemaps = require('gulp-sourcemaps');
33
- const libGulpUtil = require('gulp-util');
34
- const libBabel = require('gulp-babel');
35
- const libTerser = require('gulp-terser');
36
-
37
- // Build the module for the browser
38
- libGulp.task('minified',
39
- () => {
40
- // set up the custom browserify instance for this task
41
- var tmpBrowserify = libBrowserify(
42
- {
43
- entries: _CONFIG.EntrypointInputSourceFile,
44
- standalone: _CONFIG.LibraryObjectName,
45
- debug: true
46
- });
47
-
48
- return tmpBrowserify.bundle()
49
- .pipe(libVinylSourceStream(_CONFIG.LibraryMinifiedFileName))
50
- .pipe(libVinylBuffer())
51
- .pipe(libSourcemaps.init({loadMaps: true}))
52
- // Add transformation tasks to the pipeline here.
53
- .pipe(libBabel())
54
- .pipe(libTerser())
55
- .on('error', libGulpUtil.log)
56
- .pipe(libSourcemaps.write('./'))
57
- .pipe(libGulp.dest(_CONFIG.LibraryOutputFolder));
58
- });
59
-
60
- // Build the module for the browser
61
- libGulp.task('debug',
62
- () => {
63
- // set up the custom browserify instance for this task
64
- var tmpBrowserify = libBrowserify(
65
- {
66
- entries: _CONFIG.EntrypointInputSourceFile,
67
- standalone: _CONFIG.LibraryObjectName,
68
- debug: true
69
- });
70
-
71
- return tmpBrowserify.bundle()
72
- .pipe(libVinylSourceStream(_CONFIG.LibraryUniminifiedFileName))
73
- .pipe(libVinylBuffer())
74
- .pipe(libBabel())
75
- .on('error', libGulpUtil.log)
76
- .pipe(libGulp.dest(_CONFIG.LibraryOutputFolder));
77
- });
78
-
79
- libGulp.task
80
- (
81
- 'build',
82
- libGulp.series('debug', 'minified')
83
- );