aboutsummaryrefslogtreecommitdiffstats
path: root/log_db/tests
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-01-17 15:43:52 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-01-17 15:57:37 +0200
commit75a9d560a69312bcf4dd0b9d3f00564a78e7c120 (patch)
treef1a6ba1ae39a73a2fcf4b9bd137144cd9247a63e /log_db/tests
parent98430c35eeb27b1bb3c7ac7a9e30a6918514358a (diff)
Refactor public interface
Diffstat (limited to 'log_db/tests')
-rw-r--r--log_db/tests/integration.rs27
1 files changed, 12 insertions, 15 deletions
diff --git a/log_db/tests/integration.rs b/log_db/tests/integration.rs
index 50f4544..5535adf 100644
--- a/log_db/tests/integration.rs
+++ b/log_db/tests/integration.rs
@@ -44,11 +44,11 @@ struct Inst {
impl Recordable for Inst {
type Field = Field;
- fn schema() -> Vec<(Self::Field, ValueType)> {
+ fn schema() -> Vec<(Self::Field, Type)> {
vec![
- (Field::Id, ValueType::int()),
- (Field::Name, ValueType::string().nullable()),
- (Field::Data, ValueType::bytes()),
+ (Field::Id, Type::int()),
+ (Field::Name, Type::string().nullable()),
+ (Field::Data, Type::bytes()),
]
}
fn primary_key() -> Self::Field {
@@ -188,8 +188,8 @@ fn test_get_nonexistant() {
struct InstTestNullable {}
impl Recordable for InstTestNullable {
type Field = Field;
- fn schema() -> Vec<(Self::Field, ValueType)> {
- vec![(Field::Id, ValueType::int())]
+ fn schema() -> Vec<(Self::Field, Type)> {
+ vec![(Field::Id, Type::int())]
}
fn primary_key() -> Self::Field {
Field::Id
@@ -219,11 +219,8 @@ fn test_upsert_fails_on_null_in_non_nullable_field() {
struct InstTestNumValues {}
impl Recordable for InstTestNumValues {
type Field = Field;
- fn schema() -> Vec<(Self::Field, ValueType)> {
- vec![
- (Field::Id, ValueType::int()),
- (Field::Name, ValueType::string()),
- ]
+ fn schema() -> Vec<(Self::Field, Type)> {
+ vec![(Field::Id, Type::int()), (Field::Name, Type::string())]
}
fn primary_key() -> Self::Field {
Field::Id
@@ -253,8 +250,8 @@ fn test_upsert_fails_on_invalid_number_of_values() {
struct InstTestInvalidType {}
impl Recordable for InstTestInvalidType {
type Field = Field;
- fn schema() -> Vec<(Self::Field, ValueType)> {
- vec![(Field::Id, ValueType::int())]
+ fn schema() -> Vec<(Self::Field, Type)> {
+ vec![(Field::Id, Type::int())]
}
fn primary_key() -> Self::Field {
Field::Id
@@ -325,8 +322,8 @@ struct InstSingleId {
impl Recordable for InstSingleId {
type Field = Field;
- fn schema() -> Vec<(Self::Field, ValueType)> {
- vec![(Field::Id, ValueType::int())]
+ fn schema() -> Vec<(Self::Field, Type)> {
+ vec![(Field::Id, Type::int())]
}
fn primary_key() -> Self::Field {
Field::Id