# Class LLDatabaseSQLite

java.lang.Object
com.io7m.looseleaf.database.sqlite.LLDatabaseSQLite

All Implemented Interfaces:
  `LLDatabaseType`, `Closeable`, `AutoCloseable`

public final class LLDatabaseSQLite extends Object implements LLDatabaseType
A database based on SQLite.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `long`
  `dataSizeApproximate()`
  `Optional<String>`
  `get(LLKeyName key)`
  Get the value associated with the given key, if any.
  `Map<LLKeyName,String>`
  `getAll()`
  `boolean`
  `isClosed()`
  `long`
  `keyCountApproximate()`
  `static LLDatabaseType`
  `open(Path file)`
  Open an SQLite database.
  `Map<LLKeyName,String>`
  `readUpdateDelete(LLDatabaseRUD rud)`
  Atomically read, update, and delete values in the database.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### open

    public static LLDatabaseType open(Path file) throws IOException
    Open an SQLite database.
    Parameters:
      `file` - The database file
    Returns:
      The database
    Throws:
      `IOException` - On errors

  - ### dataSizeApproximate

    public long dataSizeApproximate() throws IOException
    Specified by:
      `dataSizeApproximate` in interface `LLDatabaseType`
    Returns:
      The approximate size of the database in bytes
    Throws:
      `IOException` - On errors

  - ### keyCountApproximate

    public long keyCountApproximate() throws IOException
    Specified by:
      `keyCountApproximate` in interface `LLDatabaseType`
    Returns:
      The approximate number of keys in the database
    Throws:
      `IOException` - On errors

  - ### isClosed

    public boolean isClosed()
    Specified by:
      `isClosed` in interface `LLDatabaseType`
    Returns:
      `true` if the store has been closed

  - ### readUpdateDelete

    public Map<LLKeyName,String> readUpdateDelete(LLDatabaseRUD rud) throws IOException
    Description copied from interface: `LLDatabaseType`
    Atomically read, update, and delete values in the database.
    Specified by:
      `readUpdateDelete` in interface `LLDatabaseType`
    Parameters:
      `rud` - The RUD operation
    Returns:
      The read keys
    Throws:
      `IOException` - On errors

  - ### get

    public Optional<String> get(LLKeyName key) throws IOException
    Description copied from interface: `LLDatabaseType`
    Get the value associated with the given key, if any.
    Specified by:
      `get` in interface `LLDatabaseType`
    Parameters:
      `key` - The key
    Returns:
      The value, if any
    Throws:
      `IOException` - On errors

  - ### getAll

    public Map<LLKeyName,String> getAll() throws IOException
    Specified by:
      `getAll` in interface `LLDatabaseType`
    Returns:
      The entire database
    Throws:
      `IOException` - On errors

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`