Class QueryNameMapImpl

  • All Implemented Interfaces:
    NameMap, Iterable<NameMap.Record>

    public class QueryNameMapImpl
    extends NameMapImpl
    The name map of a query, which ms access uses to repair the sql of the query when a table or column it uses is renamed. Its records cannot be changed, for the reason NameMap gives.
    Author:
    James Ahlborn
    Usage:
    Advanced: This class is for advanced/internal use.
    • Method Detail

      • read

        public static QueryNameMapImpl read​(byte[] bytes,
                                            DatabaseImpl database)
                                     throws IOException
        Parameters:
        bytes - the value of the name map property of a query
        database - the database which holds the query
        Returns:
        the decoded name map
        Throws:
        IOException - if the bytes are not a valid name map
      • findMismatches

        public List<NameMap.Mismatch> findMismatches()
                                              throws IOException
        Compares each record with the table or column its guid names, which is how ms access finds the objects a query uses. A record whose guid names nothing is found by its name instead. A record for a source query is compared with that query, and the column records under it are not checked, because they carry the guids of the table columns the source query reads. The records for a linked table are not checked, because the guid of a link is on the link and not on the table it opens.
        Returns:
        every difference, empty if the name map agrees with the database
        Throws:
        IOException