|
Groovy example source code file (CreateData.groovy)
The Groovy CreateData.groovy source codeprintln("Called with context: " + context) db = context.lookup("/client/tools/DatabaseHome").create() println("About to do queries on: " + db) queries = [ "CREATE TABLE account ( ssn CHAR(11) PRIMARY KEY, first_name CHAR(20), last_name CHAR(20), balance INT)", "CREATE TABLE entity ( id INT PRIMARY KEY AUTO INCREMENT, first_name CHAR(20), last_name CHAR(20) )" ] for (sql in queries) { println("evaluating: " + sql) db.execute(sql) } println("creating entity bean") context.lookup("/client/tests/entity/bmp/BasicBmpHome").create("Groovy Dain") println("Done") "OK" Other Groovy examples (source code examples)Here is a short list of links related to this Groovy CreateData.groovy source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.