limit the number of StatementTmpl in CustomPredicate: (#101)

* limit the number of StatementTmpl in CustomPredicate:

- add constructor method for CustomPredicate
- make size checks at the CustomPredicate creation, so that once instantiated we can assume that contains valid data

This resolves #79

* Update tests to use new interface

---------

Co-authored-by: Ahmad <root@ahmadafuni.com>
This commit is contained in:
arnaucube 2025-03-03 05:38:51 +01:00 committed by GitHub
parent c9f7427967
commit c92839d897
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 119 additions and 79 deletions

View file

@ -435,7 +435,7 @@ impl Pod for MockMainPod {
self.operations[i]
.deref(&self.statements[..input_statement_offset + i])
.unwrap()
.check(&s.clone().try_into().unwrap())
.check(&self.params, &s.clone().try_into().unwrap())
})
.collect::<Result<Vec<_>>>()
.unwrap();