Add FileManager, File cleanup, Logger
This commit is contained in:
@@ -136,17 +136,43 @@ class TestPersistence {
|
||||
store(
|
||||
Person(
|
||||
id = 10L,
|
||||
name = "Pipo",
|
||||
name = "John Pipo",
|
||||
age = 23
|
||||
)
|
||||
)
|
||||
store(
|
||||
Person(
|
||||
id = 11L,
|
||||
name = "Clown",
|
||||
name = "John Clown",
|
||||
age = 18
|
||||
)
|
||||
)
|
||||
|
||||
searchIndex(Person::class, "name") {
|
||||
name -> (name as? String)?.startsWith("John") == true
|
||||
}.forEach { p ->
|
||||
println("Found person where name starts with 'John': ${p.name} - ${p.age}")
|
||||
}
|
||||
}
|
||||
|
||||
pst.transaction {
|
||||
store(
|
||||
Person(
|
||||
id = 15L,
|
||||
name = "Mama",
|
||||
age = 26
|
||||
)
|
||||
)
|
||||
store(
|
||||
Person(
|
||||
id = 16L,
|
||||
name = "Loe",
|
||||
age = 16
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
pst.datastore.printStatus()
|
||||
//pst.removeOldFiles()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user