[postmodern-devel] Selecting schema with dao-class
Hi, I'm trying to find any documentation about selecting database schema with dao-class, for example something like this: (defclass my-class () ((some-column :column t :accessor some-column :initarg some-column) ..... itd)) (:metaclass postmodern:dao-class) (:table-name (:dot 'scheme-name 'table-name)) (:keys some-column)) But it seems (:dot 'scheme-name 'table-name) format is supported only in queries? How can I select an schema in database?
But it seems (:dot 'scheme-name 'table-name) format is supported only in queries? How can I select an schema in database?
The table-name has to be a string, and is not evaluated. You could just do (:table-name "schema_name.table_name"). Or use #.(sql (:dot 'foo 'bar)).
On Sat, Dec 11, 2010 at 12:17, Marijn Haverbeke <marijnh@gmail.com> wrote:
But it seems (:dot 'scheme-name 'table-name) format is supported only in queries? How can I select an schema in database?
The table-name has to be a string, and is not evaluated. You could just do (:table-name "schema_name.table_name"). Or use #.(sql (:dot 'foo 'bar)).
Great, thank you!
participants (2)
-
Marijn Haverbeke
-
Slobodan Milnović