B2G/gecko/storage/test/unit/test_locale_collation.js
/**
 * Inserts strings into our test table of the given database in the order given.
 *
 * @param aStrings
 *        An array of strings.
 * @param aConn
 *        A connection to either the UTF-8 database or the UTF-16 database.
 */
Inserts strings into our test table of the given database in the order given.
@param aStrings
An array of strings.
@param aConn
A connection to either the UTF-8 database or the UTF-16 database.
Inserts strings into our test table of the given database in the order given . @param aStrings An array of strings . @param aConn A connection to either the UTF - 8 database or the UTF - 16 database .
function initTableWithStrings(aStrings, aConn)
{
  print("Initializing test table.");
  aConn.executeSimpleSQL("DROP TABLE IF EXISTS test");
  aConn.createTable("test", "t TEXT");
  let stmt = aConn.createStatement("INSERT INTO test (t) VALUES (:t)");
  aStrings.forEach(function (str) {
    stmt.params.t = str;
    stmt.execute();
    stmt.reset();
  });
  stmt.finalize();
}
function initTableWithStrings ( aStrings , aConn ) { print ( "Initializing test table." ) ; aConn . executeSimpleSQL ( "DROP TABLE IF EXISTS test" ) ; aConn . createTable ( "test" , "t TEXT" ) ; let stmt = aConn . createStatement ( "INSERT INTO test (t) VALUES (:t)" ) ; aStrings . forEach ( function ( str ) { stmt . params . t = str ; stmt . execute ( ) ; stmt . reset ( ) ; } ) ; stmt . finalize ( ) ; }
Inserts strings into our test table of the given database in the order given.
Inserts strings into our test table of the given database in the order given .