Class SQCommand

java.lang.Object
com.seeq.utilities.process.SQCommand

public class SQCommand extends Object
Utility for creating processes to call "sq" commands, such as "sq run" and "sq db start". These can be run only in development or testing, not in production! If you need to run "seeq" commands such as "seeq start" or "seeq diag" in production, use PilotCommand.
  • Constructor Details

    • SQCommand

      public SQCommand()
  • Method Details

    • createProcessSpawn

      public static ProcessSpawn createProcessSpawn(String[] command, Class<?> callingClass)
      Creates a process spawn object whose directory is set to the location of the "nearest" sq file (moving upwards toward the root of the repo)
      Parameters:
      command - a string array containing an sq command ie {"database", "--scheme", "test"}
      callingClass - the class object for the class that is calling the command. this is used to properly locate the sq command in a parent folder.
      Returns:
      a ProcessSpawn object
    • createProcessSpawn

      public static ProcessSpawn createProcessSpawn(String[] command, File sqFile)
      Creates a process spawn object whose directory is set to an explicit "sq" file location.
      Parameters:
      command - a string array containing an sq command ie {"database", "--scheme", "test"}
      sqFile - an explicit "sq" file location. This can be used to call "sq" commands across the boundaries of directories / Maven modules. Use with caution!
      Returns:
      a ProcessSpawn object
    • findSqFile

      public static File findSqFile(Class<?> callingClass)