Faq

How do you pronounce Amalegeni ?

Stress the leg: ama-LEG-eni

What is the meaning of the word Amalegeni ?

Rubber. It's strips of old rubber tube of the car or truck variety.

What are the different delimiters ?

            DELIMITER
SQL code    << .. >>
PL-SQL code [[ .. ]]
Java code   {{ .. }}

Refcursors returned for PL-SQL

When using the square bracket delimiters for PL-SQL code, any results returned by a function are assumed to be a ref-cursors ! If you want to select a single varchar for example, then better use the SQL delimiter, and write your call as follows:


    String yourMethod( String id ) 
    <<
        select your_function( ? ) from dual 
    >>

The above example is valid for the Oracle database, for Postgresql drop the 'from dual'.

Is there a difference between code generated for different databases

For plain JDBC code generation, there is no difference, it's only the bits for PL-SQL that are different, because Oracle uses a different Type for returning pl-sql resultsets via JDBC, compared to Postgresql. That's why you need to specify the 'target' database when defining PL-SQL.

How can you invoke Amalegeni using Ant ?

Add the following to your build.xml file:

  ..
  <path id="cp">
     <pathelement path="/opt/amalegeni/amalegeni.jar" />
     ..
  </path>
  ..
  <target name="amalegeni" >
    <java classname="amalegeni.Main" classpathref="cp">
      <arg value="-d"/><arg value="template/"/>  <!-- the template directory to use -->
      <arg value="src"/>                         <!-- the root of your source files --> 
    </java>
  </target>
  ..

© Willem Moors, 2009 - 2013