35 lines
754 B
Plaintext
35 lines
754 B
Plaintext
package vato007:ingey;
|
|
|
|
world dynamic {
|
|
resource row {
|
|
get: func(name: string) -> string;
|
|
}
|
|
|
|
resource reader {
|
|
columns: func() -> list<string>;
|
|
|
|
next: func() -> row;
|
|
has-next: func() -> bool;
|
|
|
|
// Get a row by values in one or more columns
|
|
query: func(values: list<tuple<string, string>>) -> row;
|
|
}
|
|
|
|
resource read-map {
|
|
get: func(key: string) -> string;
|
|
}
|
|
|
|
resource write-map {
|
|
add: func(name: string, value: string);
|
|
}
|
|
|
|
resource readers {
|
|
get-reader: func(name: string) -> option<reader>;
|
|
}
|
|
|
|
resource writer {
|
|
write: func(row: write-map);
|
|
}
|
|
|
|
export evaluate: func(readers: readers, properties: read-map, writer: writer);
|
|
} |