caveman icon indicating copy to clipboard operation
caveman copied to clipboard

Project `:mode` and `:database-connection-spec`

Open vityok opened this issue 11 years ago • 2 comments

Could somebody please clarify if project configuration is really parsed, especially the :database-connection-spec parameter.

As far as I understand the only information that has any sort of impact is:

log-path, application-root, port, server

and probably some others. However, I could not trace any usage of the :database-connection-spec parameter. The CLSQL Middleware module uses connection-spec parameter and its default value is "memory" (without :, meaning that it is a file).

Does anybody have this problem with configuration? How to properly configure database-spec of the CLSQL middleware module? How to add new parameters to the configuration?

vityok avatar Oct 08 '13 08:10 vityok

In the first place, configuration is just a property list in Caveman. :mode is for switching configurations.

So, there is no restriction to add new parameters. If you add :database-connection-spec to your config file, you can get its value in the application code by calling (config :database-connection-spec).

CLSQL was used as the default DB module in Caveman before. cf593cbc072e25f26a39eab10b4d1461a9b7f83e might be help you.

fukamachi avatar Oct 09 '13 02:10 fukamachi

The changeset is exactly what I was looking for. The problem is that the documentation in README is a little bit behind the current sources as CLSQL is no longer initialized in the described way per default.

Thanks for pointing this out!

Could you please update the README file to avoid similar confusion in the future?

vityok avatar Oct 09 '13 09:10 vityok