-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
139 changed files
with
708 additions
and
708 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
/* | ||
* Copyright (C) 2023 The TYPEWRITER Development Team | ||
* | ||
* Licensed under the MIT License (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/licenses/MIT | ||
*/ | ||
package typewriter.api; | ||
|
||
public abstract class Migration { | ||
|
||
protected final void changelog() { | ||
|
||
} | ||
/* | ||
* Copyright (C) 2024 The TYPEWRITER Development Team | ||
* | ||
* Licensed under the MIT License (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/licenses/MIT | ||
*/ | ||
package typewriter.api; | ||
|
||
public abstract class Migration { | ||
|
||
protected final void changelog() { | ||
|
||
} | ||
} |
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
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
/* | ||
* Copyright (C) 2023 The TYPEWRITER Development Team | ||
* | ||
* Licensed under the MIT License (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/licenses/MIT | ||
*/ | ||
package typewriter.h2; | ||
|
||
import kiss.I; | ||
|
||
public class Functions { | ||
|
||
public static int jsonArrayLength(String json) { | ||
return I.json(json).find("*").size(); | ||
} | ||
|
||
public static boolean jsonArrayContains(String json, String value) { | ||
return I.json(json).asMap(String.class).containsValue(value); | ||
} | ||
/* | ||
* Copyright (C) 2024 The TYPEWRITER Development Team | ||
* | ||
* Licensed under the MIT License (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/licenses/MIT | ||
*/ | ||
package typewriter.h2; | ||
|
||
import kiss.I; | ||
|
||
public class Functions { | ||
|
||
public static int jsonArrayLength(String json) { | ||
return I.json(json).find("*").size(); | ||
} | ||
|
||
public static boolean jsonArrayContains(String json, String value) { | ||
return I.json(json).asMap(String.class).containsValue(value); | ||
} | ||
} |
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
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
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
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
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 |
---|---|---|
@@ -1,41 +1,41 @@ | ||
/* | ||
* Copyright (C) 2023 The TYPEWRITER Development Team | ||
* | ||
* Licensed under the MIT License (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/licenses/MIT | ||
*/ | ||
package typewriter.api; | ||
|
||
import java.lang.annotation.RetentionPolicy; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import kiss.Signal; | ||
import typewriter.api.model.DerivableModel; | ||
|
||
public interface EnumTestSet extends Testable { | ||
|
||
@Test | ||
default void codec() { | ||
QueryExecutor<EnumValue, Signal<EnumValue>, ?, ?> dao = createEmptyDB(EnumValue.class); | ||
dao.update(new EnumValue(RetentionPolicy.CLASS)); | ||
|
||
EnumValue person = dao.limit(1).waitForTerminate().to().v; | ||
assert person.policy.equals(RetentionPolicy.CLASS); | ||
} | ||
|
||
static class EnumValue extends DerivableModel { | ||
|
||
public RetentionPolicy policy; | ||
|
||
private EnumValue() { | ||
} | ||
|
||
private EnumValue(RetentionPolicy policy) { | ||
this.policy = policy; | ||
} | ||
} | ||
/* | ||
* Copyright (C) 2024 The TYPEWRITER Development Team | ||
* | ||
* Licensed under the MIT License (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/licenses/MIT | ||
*/ | ||
package typewriter.api; | ||
|
||
import java.lang.annotation.RetentionPolicy; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import kiss.Signal; | ||
import typewriter.api.model.DerivableModel; | ||
|
||
public interface EnumTestSet extends Testable { | ||
|
||
@Test | ||
default void codec() { | ||
QueryExecutor<EnumValue, Signal<EnumValue>, ?, ?> dao = createEmptyDB(EnumValue.class); | ||
dao.update(new EnumValue(RetentionPolicy.CLASS)); | ||
|
||
EnumValue person = dao.limit(1).waitForTerminate().to().v; | ||
assert person.policy.equals(RetentionPolicy.CLASS); | ||
} | ||
|
||
static class EnumValue extends DerivableModel { | ||
|
||
public RetentionPolicy policy; | ||
|
||
private EnumValue() { | ||
} | ||
|
||
private EnumValue(RetentionPolicy policy) { | ||
this.policy = policy; | ||
} | ||
} | ||
} |
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.