GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • V7.x Documentation
  • Privacy Statement
  • License Agreement
  • Contact Us

This view

  • Original page
  • New address

GeezerVison is showing docs.voltdb.com — 8.2. Loading a User-Defined Function into the Database

  • Volt Active Data
  • Feedback/Discuss
  • V7.x Books
    • VoltDB Tutorial
    • Using VoltDB
    • VoltDB Guide to Performance and Customization
    • VoltDB Planning Guide
    • VoltDB Administrator's Guide
  • Current docs ▶
8.2. Loading a User-Defined Function into the Database

Documentation

VoltDB Home » Documentation » Guide to Performance and Customization
< previoustable of contentsnext >

8.2. Loading a User-Defined Function into the Database

Once you have written, compiled, and tested the Java code for your SQL function, you can load it into the database. You load user-defined functions the same way you load stored procedures, by packaging the Java class or classes into a JAR file and then loading the JAR file using the LOAD CLASSES statement. For example:

$ export CLASSPATH="$CLASSPATH:/opt/voltdb/voltdb/*"
$ javac -d ./obj src/myapp/functions/*.java
$ jar cvf myfunctions.jar -C obj .
$ sqlcmd
1> load classes myfunctions.jar;

You can package multiple function methods or a combination of functions and stored procedure classes into a single JAR file. The key is that you must load the class containing the function method into the database before you can declare the SQL function.

< previoustable of contentsnext >
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.