-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61f6c0f
commit 0fa15c7
Showing
6 changed files
with
13 additions
and
11 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
11 changes: 11 additions & 0 deletions
11
src/main/java/me/mrnavastar/sqlib/api/types/GsonTypes.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,11 @@ | ||
package me.mrnavastar.sqlib.api.types; | ||
|
||
import com.google.gson.*; | ||
import me.mrnavastar.sqlib.impl.SQLPrimitive; | ||
|
||
public class GsonTypes { | ||
public static final SQLibType<JsonElement> ELEMENT = new SQLibType<>(SQLPrimitive.STRING, JsonElement::toString, JsonParser::parseString); | ||
public static final SQLibType<JsonObject> OBJECT = new SQLibType<>(ELEMENT, v -> v, v -> (JsonObject) v); | ||
public static final SQLibType<JsonArray> ARRAY = new SQLibType<>(ELEMENT, v -> v, v -> (JsonArray) v); | ||
public static final SQLibType<JsonPrimitive> PRIMITIVE = new SQLibType<>(ELEMENT, v -> v, v -> (JsonPrimitive) v); | ||
} |
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