-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #663 from treasure-data/last-results-compat
Making "store_last_results: true" consistent between td> and pg>
- Loading branch information
Showing
15 changed files
with
321 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,6 @@ public interface JdbcResultSet | |
List<String> getColumnNames(); | ||
|
||
List<Object> next(); | ||
|
||
boolean skip(); | ||
} |
47 changes: 47 additions & 0 deletions
47
digdag-standards/src/main/java/io/digdag/standards/operator/jdbc/StoreLastResultsOption.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package io.digdag.standards.operator.jdbc; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonValue; | ||
import io.digdag.client.config.ConfigException; | ||
import static java.util.Locale.ENGLISH; | ||
|
||
public enum StoreLastResultsOption | ||
{ | ||
FALSE(false), | ||
ALL(true), | ||
FIRST(true); | ||
|
||
private final boolean enabled; | ||
|
||
private StoreLastResultsOption(boolean enabled) | ||
{ | ||
this.enabled = enabled; | ||
} | ||
|
||
public boolean isEnabled() | ||
{ | ||
return enabled; | ||
} | ||
|
||
@JsonCreator | ||
public static StoreLastResultsOption parse(String text) | ||
{ | ||
switch (text) { | ||
case "false": | ||
return FALSE; | ||
case "true": | ||
case "first": | ||
return FIRST; | ||
case "all": | ||
return ALL; | ||
default: | ||
throw new ConfigException("last_results must be either of \"first\" or \"all\": " + text); | ||
} | ||
} | ||
|
||
@JsonValue | ||
public String toString() | ||
{ | ||
return name().toLowerCase(ENGLISH); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.