You are not logged in.
Pages: 1
Hi @ab, ConnectionTimeOutMinutes can be modified as as published property for storing with TSynDefinition ?
Thanks.
EMartin.
Esteban
Offline
Sorry for my mystake, I mean TSynConnectionDefinition.
Thanks.
Esteban
Offline
ConnectionTimeOutMinutes is a HTTP property, whereas TSynConnectionDefinition is a REST definition.
So ConnectionTimeOutMinutes should not be part of TSynConnectionDefinition.
You can add your own settings, just by inheriting the class, or even better by nesting the class within other classes.
Offline
ConnectionTimeOutMinutes is in TSQLDBConnectionProperties, I think this property is candidate to be configurable and storable. But I'll make my own implementation.
Another util modification, for me, could be that TSQLDBConnectionProperties can have a "Name" property, my application server can have different database connections to different engines, then I can to identify each connection by name (util legacy from RemObjects). Of course TSynConnectionDefinition should have this property too.
Can you make TSQLDBConnectionProperties.DefinitionTo virtual ? so I can manage added properties to TSynConnectionDefinition. The same for TSynConnectionDefinition.CreateFromJSON and TSynConnectionDefinition.SaveToJSON.
Thanks.
Esteban
Offline
TSynConnectionDefinition just contains what is needed for both RESTful and SynDB instance creation.
Other parameters should be set after the TSQLRest or TSQLDBConnectionProperties instances are created.
IMHO you should not put all your information in TSynConnectionDefinition, but in another parent class.
I defined the methods as virtual.
See http://synopse.info/fossil/info/6692f83229
But I would not go into this direction, personnally.
I would define dedicated TSynPersistent and TSynAutoCreateFields classes for the settings, containing TSynConnectionDefinition, not inhering from TSynConnectionDefinition.
Then use ObjectToJson() serialization.
See e.g. how unit dddInfraSettings define its settings.
Offline
Pages: 1