Please, use PgEscaper, PdoEscaper or your custom escape implementation instead of DummyEscaper.
 DummyEscaper only for examples. i? - trying convert

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-05-02 18:30:04

Please, use PgEscaper, PdoEscaper or your custom escape implementation instead of DummyEscaper. DummyEscaper only for examples.

i? - trying convert to int sql type positional parameter i?name1 - trying convert to int sql named parameter "name1" ? - trying resolve passed positional parameter type to reasonable sql type ?name1 - trying resolve passed named parameter "name1" type to reasonable sql type

More and most descriptive test cases with subquery and parameter types Check resolvers setup example in Query::resolvers() it can be extended to customize placeholders or/and customize resolvers

Parsers are responsible for providing placeholders from string template as parts of Abstract syntax tree. Abstract syntax tree is an implementation of composite pattern, where leaf is a token(must have string representation) in sql context and composites(e.g.placeholders) are more complex sql structures. Every composite must be transformed to tokens by calling compile(mixed ...$dependencies) method. Every token must be transformed to string by calling compile(mixed ...$dependencies) method. Tokens must be assembled by assembler calling method assemble providing Tokens and ...$dependencies.

Placeholders are just substrings with optionally following by name [a-zA-Z0-9_]+ string: ? - if no name provided, using next positional parameter ?email - using array parameters item with key email i?id - convert using array parameters item with key id to int

Leave a Comment