Basically, we can specify schema name with table name with Aurelius.
My question is - is there a way to dynamically change the schema name? For example, the following entity, I'd like to change the schema name 'dbo' based on the month of the year, like 'dbo-20210312', is that doable?
Second question: is it possible to create a postgresql schema, using Aurelius? maybe by calling a stored procedure? Something like, before establishing a connection to postgresql server, I'd like to check if the schema exists, if not , create; then connect to the newly created schema. --- is that doable with Aurelius?
I figured out using FireDAC TFDQuery to create schema dynamically based on some name-convention.
But now I need to find out how to "dynamically" change Entity's schema name, for example, the following Entity has a static schema 'dbo' defined - is there away to "intercept" the schema name during run time, and append something like "dbo-20210312"?
I think I can take advantage of the function RegisterEntity (redefine it) to internally save the entity's fully qualified name to a list. Then later I can use the list to loop-update the schema names.
But I am not sure if this is an elegant way. So, if there is better way, please advise......