The class MapperExtension
has some methods, and before_insert
, before_update
, ... all have a parameter connection
.
def before_insert(self, mapper, connection, instance):
I've read the documents of MapperExtension
, but found nothing about this connection
. What is it? And how to use it?