fcf.module({
  name: "fcf:tests/NFSQL/DB.Update.js",
  dependencies: ["fcf:NTest/uniTest.js", "fcf:tests/NFSQL/Helpers/Helper.js"],
  module: function(uniTest, Helper) {
    uniTest.add("FSQL DB" , "DB Update", function(a_tester) {

      Helper.query(
        a_tester, { query: "UPDATE fcftest_single_types_update1 SET str1 = ${1}, int1 = ${2} WHERE id = ${3}", args: ["test", 9, 1]},
        function(a_records){
        }
      );
      Helper.query(
        a_tester, { query: "SELECT str1, int1 FROM fcftest_single_types_update1 WHERE id = ${1}", args: [1]},
        function(a_records){
          uniTest.equal(a_records, [[{ str1: 'test', int1: 9, "@key": 1 }]]);
        }
      );
      Helper.query(
        a_tester, { query: "UPDATE fcftest_single_types_update1 SET str1 = ${1}, int1 = ${2} WHERE id = ${3}", args: ["test2", 0, 1] },
        function(a_records){
        }
      );
      Helper.query(
        a_tester, { query: "SELECT str1, int1 FROM fcftest_single_types_update1 WHERE id = ${1}", args: [1] },
        function(a_records){
          uniTest.equal(a_records, [[{ str1: 'test2', int1: 0, "@key": 1 }]]);
        }
      );

    });
  }
});
