hunk.code_window:                 .filter((value, index, self) => self.indexOf(value) === index) // unqiue
                   .map(async dbIndexName => {
                       const dbIndex = dbIndices.find(dbIndex => dbIndex["name"] === dbIndexName);
                       const indexInfos: ObjectLiteral[] = await this.query(`PRAGMA index_info("${dbIndex!["name"]}")`);
                       const indexColumns = indexInfos.map(indexInfo => indexInfo["name"]);
                       // check if db index is generated by sqlite itself and has special use case
                       if (dbIndex!["name"].substr(0, "sqlite_autoindex".length) === "sqlite_autoindex") {
                           if (dbIndex!["unique"] === 1) { // this means we have a special index generated for a column
  
hunk.labels: keep keep keep keep replace keep keep keep keep
hunk.after_edit:                     const indexColumns = indexInfos
                           .sort((indexInfo1, indexInfo2) => parseInt(indexInfo1["seqno"]) - parseInt(indexInfo2["seqno"]))
                           .map(indexInfo => indexInfo["name"]);
  
hunk.file_path: src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts
hunk.type: replace
file: import "reflect-metadata";
  import {closeTestingConnections, createTestingConnections, reloadTestingDatabases} from "../../utils/test-utils";
  import {Connection} from "../../../src/connection/Connection";
  import {User} from "./entity/User";
  
  describe("github issues > #704 Table alias in WHERE clause is not quoted in PostgreSQL", () => {
  
      let connections: Connection[];
      before(async () => connections = await createTestingConnections({
          entities: [__dirname + "/entity/*{.js,.ts}"],
          schemaCreate: true,
          dropSchema: true,
      }));
      beforeEach(() => reloadTestingDatabases(connections));
      after(() => closeTestingConnections(connections));
  
      it("should return user by a given email and proper escape 'user' keyword", () => Promise.all(connections.map(async connection => {
  
          const user = new User();
          user.email = "john@example.com";
          await connection.manager.save(user);
  
          const loadedUser = await connection.getRepository(User).findOne({ email: "john@example.com" });
  
          loadedUser!.id.should.be.equal(1);
          loadedUser!.email.should.be.equal("john@example.com");
      })));
  
  });
  