java.lang.Object
fr.multimc.api.commons.data.sources.database.models.Query
Direct Known Subclasses:
CreateTableQuery, InsertQuery, SelectQuery, UpdateQuery

public abstract class Query extends Object
  • Constructor Details

    • Query

      public Query()
  • Method Details

    • getQuery

      public abstract String getQuery(@NotNull @NotNull DatabaseType databaseType)
      Get a SQL query from an object that extends Query
      Parameters:
      databaseType - Database type, can be SQLITE or MYSQL
      Returns:
      String that represent a SQL query
    • execute

      public abstract QueryResult execute(@NotNull @NotNull Database database)
      Execute a query
      Parameters:
      database - Database instance
      Returns:
      QueryResult
    • execute

      protected QueryResult execute(@NotNull @NotNull Database database, @NotNull @NotNull QueryType queryType)