I’m familiar with Python generators, however I’ve just come across the term “generative method” which I am not familiar with and cannot find a satisfactory definition.
To put it in context, I found the term in SQLAlchemy’s narrative documentation:
Full control of the “autocommit” behavior is available using the generative Connection.execution_options() method provided on Connection, Engine, Executable, using the “autocommit” flag which will turn on or off the autocommit for the selected scope.
What is a generative method? Trying to iterate the object returned by Connection.execution_options() doesn’t work so I’m figuring it’s something other than a standard generator.
It doesn’t appear to be a common database concept, but SQLAlchemy uses the term generative in the sense “generated by your program iteratively at runtime”. (So, no connection to python generators). An example from the tutorial:
This call syntax is more commonly known as “method chaining”, and the design that allows it as a “fluent interface”.
So, in the case of
Connection.execution_options(), “generative” means that it returns the modified connection object, so that you can chain the calls as above.