[ANN] A Genuine JDBC Scripting Language

From: James Huang <judoscript_at_hotmail.com>
Date: 16 Nov 2001 23:53:59 -0800
Message-ID: <52719db8.0111162353.3fca0831_at_posting.google.com>



Greetings!

Introducing JudoScript, a full-fledged scripting language that supports genuine JDBC scripting. Free form SQL statements can be specified and executed either individually or in a group or batch. Expressions can be embedded in the SQL statements. SQL statements can be prepared and run with bind parameters. Stored procedure calls can take in-, out- and bidirectional bind parameters. Multiple connections can be set up independently and SQL statements are bound to each.

The article at

    http://www.judoscript.com/articles/jdbc.html

explains everything with a lot of sample scripts that are runnable against Oracle and Microsoft SQL Server.

JudoScript is a powerful cross-database, cross-format data processing language. Multiple database connections can be set up simultaneously, data from all databases are in JDBC SQL data types, so cross-database transfer is natural. In addition to JDBC scripting, JudoScript also supports XML scripting, file operations, HTML/HTTP downloading and scraping, networking, EJB invocation, and last but not least, it is a complete general purpose programming language with robust data strctures that support sophisticated algorithms.

JudoScript has a built-in scheduler that can run any tasks, including database operations, running native executables and sending mails. The scheduled jobs have an embedded control panel accessed via HTTP, allowing system administrators to monitor and/or control the job. For more information, visit

    http://www.judoscript.com

The following is a simple example to give you a sense what the code looks like:

//
// connect to database as the default connection
//

  connect to 'jdbc:oracle:thin:_at_localhost:1521:somedb',

             'dbuser', 'dbpass';

//
// create a table and an index
//

  executeSQL {
    create table newborn (

      id        int primary key,
      name      varchar(50) not null,
      birthday  date

    );

    create index emp_name on newborn(name);   }

//
// insert a few records using static SQL.
//

              'Michelle' = date(2001,11,14, 9,12, 5),
              'Daniel'   = date(2001,11,14,14,45, 8),
              'Kristine' = date(2001,11,14,23,58,48)
          );

  $id = 100;
  for $x in $data.keys() {
    executeSQL
      insert into newborn (id,name,birthday)
      value ( (* $id++ *), (* $x *), (* $data.($x) *) );
  }

//
// make a query with prepared SQL
//

  prepare $q:
    select id, name from newborn where birthday < ?   ;
  executeQuery $q
    with _at_1:timestamp = date(2001,11,14,12,0,0);

  println 'Babies born in the afternoon:';   while $q.next() {
    println $q[1] :>5, ' ', $q[2]; // first column right adjusted // println $q.id :>5, ' ', $q.name; // another way.   }

Cheers!

James Huang, author of JudoScript Received on Sat Nov 17 2001 - 08:53:59 CET

Original text of this message