Then when you run the prepared query, it can simply call the closure, putting the right value in the datastructure without escaping anything, and continuing on from there.
Of course, the realities of it are more complicated than that for optimization reasons, but that's the basis of it.
Now, if you give it a prepared statement:
The database engine can convert that into a closure, something like this: Then when you run the prepared query, it can simply call the closure, putting the right value in the datastructure without escaping anything, and continuing on from there.Of course, the realities of it are more complicated than that for optimization reasons, but that's the basis of it.