How do I use createView?

37 views
Skip to first unread message

cjh

unread,
Jan 6, 2009, 2:17:37 PM1/6/09
to Autobase
*sigh*

I'm sure this will be obvious once I see it, but how do I use the
'createView' command and its cousins? The Liquibase syntax is

<createView viewName="personView">
select id, firstname from person
</createView>

In the autobase DSL, how do I specify the body of the XML tag? I tried
the following

createView(viewName:'personView') {

''' select id, firstname from person
'''
}

But that doesn't work.

Thanks!

Robert Fischer

unread,
Jan 6, 2009, 9:08:03 PM1/6/09
to grails-...@googlegroups.com
That approach isn't going to work. The actual property being set is "selectQuery", so something
like this works fine:

createView(viewName:'personView', selectQuery:'''
select id, firstname from person
''')

I found this by looking up the change in the API: http://www.liquibase.org/api/index.html

Looking at Liquibase, it's not clear to me how they specify what the body property is. I'll pitch
that over to the Liquibase list and fix up Liquibase-DSL to support it. I need to release a version
using their ChangeLogFactory anyway.

~~ Robert.
--
~~ Robert Fischer.
Grails Trainining http://www.smokejumperit.com/grails_training.html
Smokejumper Consulting http://smokejumperit.com
Enfranchised Mind Blog http://enfranchisedmind.com/blog
Reply all
Reply to author
Forward
0 new messages