Class SchemaReader

java.lang.Object
me.lucko.luckperms.common.storage.implementation.sql.SchemaReader

public final class SchemaReader extends Object
  • Method Details

    • getStatements

      public static List<String> getStatements(InputStream is) throws IOException
      Parses a schema file to a list of SQL statements
      Parameters:
      is - the input stream to read from
      Returns:
      a list of statements
      Throws:
      IOException - if an error occurs whilst reading the file
    • tableFromStatement

      public static String tableFromStatement(String statement)
    • filterStatements

      public static List<String> filterStatements(List<String> statements, List<String> currentTables)
      Filters which statements should be executed based on the current list of tables in the database
      Parameters:
      statements - the statements to filter
      currentTables - the current tables in the database
      Returns:
      the filtered list of statements