The majority of dynamic strings I build are arrays of strings that I join to a single string at the end. Will these be statically knowable?

On Tue, 2021-08-10 at 13:59 +0000, gbleaney@gmail.com wrote:
many non-trivial queries (e.g. conditionally including clauses) require generating SQL statements dynamically.

Yup, you're totally right. And a dynamically created SQL query that uses only strings that are statically knowable (read: is just a bunch of `Literal[str]`s concatenated together) is going to be safe for use in a SQL API in all but the most contrived scenarios. And we can still get a `Literal[str]` on a dynamic SQL string built in this way if we add an override on `str.__add__`:

```
def __add__(self: Literal[str], s: Literal[str]) -> Literal[str]: ...
```
_______________________________________________
Typing-sig mailing list -- typing-sig@python.org
To unsubscribe send an email to typing-sig-leave@python.org
https://mail.python.org/mailman3/lists/typing-sig.python.org/
Member address: pbryan@anode.ca