mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 21:17:08 +00:00
(improvement)(Headless) Support optimizing and generating SQL based on the engine type. (#666)
This commit is contained in:
@@ -28,4 +28,14 @@ public enum EngineType {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public static EngineType fromString(String value) {
|
||||
for (EngineType engineType : EngineType.values()) {
|
||||
if (engineType.name().equalsIgnoreCase(value)) {
|
||||
return engineType;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid value: " + value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user