Error codes · Declarations and their clauses
PW0344
reads_more_than_given
The program must hold to this: a query asks no more consistency of a source than its reads give.
A program the compiler refuses with it
module feed.loose
type Post = Post { id: String, text: String }
source Cache
holds Post
transactions none
reads eventual
changes none
fn post(id: String) -> Post !{ database.read<Post> }
host "feed:data/posts#get"
query Latest(id: String) -> Post
consistency strong
key id
{
post(id)
}From Sources, in Data on the server. A test holds the guide's examples to the compiler.
The decisions behind it
Reading the diagnostic
pw check prints the code in brackets, [PW0344], with the sentence above and the place in your program. Errors and diagnostics explains how to read one, and every code is listed with its rule.