Class DBEntry


  • public class DBEntry
    extends java.lang.Object
    Database entry class, to get the list of column names and format for a given table, with a query like:
     SELECT column_name, data_type FROM information_schema.columns WHERE table_name = ...
     
    Author:
    talonso
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DBEntry.FORMAT
      Database formats for the columns
    • Constructor Summary

      Constructors 
      Constructor Description
      DBEntry​(java.lang.String n, DBEntry.FORMAT f)
      Constructor
    • Constructor Detail

      • DBEntry

        public DBEntry​(java.lang.String n,
                       DBEntry.FORMAT f)
        Constructor
        Parameters:
        n - Name
        f - Format
    • Method Detail

      • getFormat

        public DBEntry.FORMAT getFormat()
        Returns the entry format
        Returns:
        the format
      • setFormat

        public void setFormat​(DBEntry.FORMAT format)
        Sets the entry format
        Parameters:
        format - the format to set
      • getName

        public java.lang.String getName()
        Returns the entry name
        Returns:
        the name
      • setName

        public void setName​(java.lang.String name)
        Sets the entry name
        Parameters:
        name - the name to set
      • parseQueryResults

        public static java.util.ArrayList<DBEntry> parseQueryResults​(java.lang.StringBuilder s)
        Parse the results of a query of type
         SELECT column_name, data_type FROM information_schema.columns WHERE table_name = ...
         
        , identifying the column names and their data types
        Parameters:
        s - The query results
        Returns:
        The list of database entries