foxhound 2.0.5 → 2.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foxhound",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "A Database Query generation library.",
5
5
  "main": "source/FoxHound.js",
6
6
  "scripts": {
@@ -19,7 +19,7 @@
19
19
  var FoxHoundDialectMSSQL = function(pFable)
20
20
  {
21
21
  //Request time from SQL server with microseconds resolution
22
- const SQL_NOW = "NOW(3)";
22
+ const SQL_NOW = "GETUTCDATE()";
23
23
 
24
24
  _Fable = pFable;
25
25
 
@@ -493,7 +493,7 @@ suite
493
493
  // This is the query generated by the MSSQL dialect
494
494
  _Fable.log.trace('Create Query', tmpQuery.query);
495
495
  Expect(tmpQuery.query.body)
496
- .to.equal("INSERT INTO Animal ( IDAnimal, GUIDAnimal, CreateDate, CreatingIDUser, UpdateDate, UpdatingIDUser, Deleted, Name, Age) VALUES ( NULL, @GUIDAnimal_1, NOW(3), @CreatingIDUser_3, NOW(3), @UpdatingIDUser_5, @Deleted_6, @Name_7, @Age_8);");
496
+ .to.equal("INSERT INTO Animal ( IDAnimal, GUIDAnimal, CreateDate, CreatingIDUser, UpdateDate, UpdatingIDUser, Deleted, Name, Age) VALUES ( NULL, @GUIDAnimal_1, GETUTCDATE(), @CreatingIDUser_3, GETUTCDATE(), @UpdatingIDUser_5, @Deleted_6, @Name_7, @Age_8);");
497
497
  }
498
498
  );
499
499
  test
@@ -525,7 +525,7 @@ suite
525
525
  // This is the query generated by the MSSQL dialect
526
526
  _Fable.log.trace('Create Query', tmpQuery.query);
527
527
  Expect(tmpQuery.query.body)
528
- .to.equal("INSERT INTO Animal ( IDAnimal, GUIDAnimal, CreateDate, CreatingIDUser, UpdateDate, UpdatingIDUser, Deleted, Name, Age) VALUES ( NULL, @GUIDAnimal_1, NOW(3), @CreatingIDUser_3, NOW(3), @UpdatingIDUser_5, @Deleted_6, @Name_7, @Age_8);");
528
+ .to.equal("INSERT INTO Animal ( IDAnimal, GUIDAnimal, CreateDate, CreatingIDUser, UpdateDate, UpdatingIDUser, Deleted, Name, Age) VALUES ( NULL, @GUIDAnimal_1, GETUTCDATE(), @CreatingIDUser_3, GETUTCDATE(), @UpdatingIDUser_5, @Deleted_6, @Name_7, @Age_8);");
529
529
  }
530
530
  );
531
531
  test
@@ -676,7 +676,7 @@ suite
676
676
  // This is the query generated by the MSSQL dialect
677
677
  _Fable.log.trace('Delete Query', tmpQuery.query);
678
678
  Expect(tmpQuery.query.body)
679
- .to.equal('UPDATE Animal SET UpdateDate = NOW(3), Deleted = 1, DeletingIDUser = @DeletingIDUser_2, DeleteDate = NOW(3) WHERE IDAnimal = @IDAnimal_w0 AND Animal.Deleted = @Deleted_w1;');
679
+ .to.equal('UPDATE Animal SET UpdateDate = GETUTCDATE(), Deleted = 1, DeletingIDUser = @DeletingIDUser_2, DeleteDate = GETUTCDATE() WHERE IDAnimal = @IDAnimal_w0 AND Animal.Deleted = @Deleted_w1;');
680
680
  }
681
681
  );
682
682
  test
@@ -704,7 +704,7 @@ suite
704
704
  // This is the query generated by the MSSQL dialect
705
705
  _Fable.log.trace('Update Query', tmpQuery.query);
706
706
  Expect(tmpQuery.query.body)
707
- .to.equal('UPDATE Animal SET GUIDAnimal = @GUIDAnimal_0, UpdateDate = NOW(3), UpdatingIDUser = @UpdatingIDUser_2, Name = @Name_3, Age = @Age_4 WHERE IDAnimal = @IDAnimal_w0;');
707
+ .to.equal('UPDATE Animal SET GUIDAnimal = @GUIDAnimal_0, UpdateDate = GETUTCDATE(), UpdatingIDUser = @UpdatingIDUser_2, Name = @Name_3, Age = @Age_4 WHERE IDAnimal = @IDAnimal_w0;');
708
708
  }
709
709
  );
710
710
  test
@@ -788,7 +788,7 @@ suite
788
788
  // This is the query generated by the MSSQL dialect
789
789
  _Fable.log.trace('Update Query', tmpQuery.query);
790
790
  Expect(tmpQuery.query.body)
791
- .to.equal('UPDATE Animal SET GUIDAnimal = @GUIDAnimal_0, UpdateDate = NOW(3), UpdatingIDUser = @UpdatingIDUser_2, Deleted = @Deleted_3, Name = @Name_4, Age = @Age_5 WHERE IDAnimal = @IDAnimal_w0 AND Deleted = @Deleted_w1;');
791
+ .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;');
792
792
  }
793
793
  );
794
794
  test
@@ -810,7 +810,7 @@ suite
810
810
  // This is the query generated by the MSSQL dialect
811
811
  _Fable.log.trace('Delete Query', tmpQuery.query);
812
812
  Expect(tmpQuery.query.body)
813
- .to.equal('UPDATE Animal SET UpdateDate = NOW(3), Deleted = 1, DeletingIDUser = @DeletingIDUser_2, DeleteDate = NOW(3) WHERE IDAnimal = @IDAnimal_w0 AND Animal.Deleted = @Deleted_w1;');
813
+ .to.equal('UPDATE Animal SET UpdateDate = GETUTCDATE(), Deleted = 1, DeletingIDUser = @DeletingIDUser_2, DeleteDate = GETUTCDATE() WHERE IDAnimal = @IDAnimal_w0 AND Animal.Deleted = @Deleted_w1;');
814
814
  }
815
815
  );
816
816
  test
@@ -853,7 +853,7 @@ suite
853
853
  // This is the query generated by the MSSQL dialect
854
854
  _Fable.log.trace('Undelete Query', tmpQuery.query);
855
855
  Expect(tmpQuery.query.body)
856
- .to.equal('UPDATE Animal SET UpdateDate = NOW(3), UpdatingIDUser = @UpdatingIDUser_1, Deleted = 0 WHERE IDAnimal = @IDAnimal_w0;');
856
+ .to.equal('UPDATE Animal SET UpdateDate = GETUTCDATE(), UpdatingIDUser = @UpdatingIDUser_1, Deleted = 0 WHERE IDAnimal = @IDAnimal_w0;');
857
857
  }
858
858
  );
859
859
  test