Overview | Package | Class | Tree
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## SQLite
Class Vm

    java.lang.Object
      SQLite.Vm

public class Vm
extends Object

Class to represent compiled SQLite VM.

Field Summary
`protected int` | `error_code` Internal last error code for compile()/step() methods.
`private long` | `handle` Internal handle for the compiled SQLite VM.

Constructor Summary
`Vm()`

Method Summary
`boolean` | `compile()` Compile the next SQL statement for the SQLite VM instance.
`protected void` | `finalize()` Destructor for object.
`private static void` | `internal_init()` Internal native initializer.
`boolean` | `step(Callback cb)` Perform one step on compiled SQLite VM.
`void` | `stop()` Abort the compiled SQLite VM.

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### error_code

    protected int error_code

  Internal last error code for compile()/step() methods.

### handle

    private long handle

  Internal handle for the compiled SQLite VM.

Constructor Detail

### Vm

    public Vm()

Method Detail

### compile

    public boolean compile()
                    throws Exception

  Compile the next SQL statement for the SQLite VM instance.

  Returns:
    true when SQL statement has been compiled, false on end of statement sequence.
  Throws:
    `Exception`

### finalize

    protected void finalize()

  Destructor for object.

### internal_init

    private static void internal_init()

  Internal native initializer.

### step

    public boolean step(Callback cb)
                 throws Exception

  Perform one step on compiled SQLite VM. The result row is passed to the given callback interface.
  Example:

         ...
         try {
           Vm vm = db.compile("select * from x; select * from y;");
           while (vm.step(cb)) {
             ...
           }
           while (vm.compile()) {
             while (vm.step(cb)) {
               ...
             }
           }
         } catch (SQLite.Exception e) {
         }

  Parameters:
    `cb` - the object implementing the callback methods.
  Returns:
    true as long as more row data can be retrieved, false, otherwise.
  Throws:
    `Exception`

### stop

    public void stop()
              throws Exception

  Abort the compiled SQLite VM.

  Throws:
    `Exception`

Overview | Package | Class | Tree
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Contact: Christian Werner