# Luna Streams v.0.6.21 documentation

## Database

We support Oracle and Postgres databases.

## DB scheme

class luna_streams.db.streams_db_tools.models.streams_db_models.Group(**kwargs)

  Database table model for group.

class luna_streams.db.streams_db_tools.models.streams_db_models.GroupStream(**kwargs)

  Database table model for links between stream and group.

class luna_streams.db.streams_db_tools.models.streams_db_models.Handler(**kwargs)

  Database table model for stream handler info.

class luna_streams.db.streams_db_tools.models.streams_db_models.Location(**kwargs)

  Database table model for stream location info.

class luna_streams.db.streams_db_tools.models.streams_db_models.Log(**kwargs)

  Database table model for stream logging.

class luna_streams.db.streams_db_tools.models.streams_db_models.Restart(**kwargs)

  Database table model for stream restart info.

class luna_streams.db.streams_db_tools.models.streams_db_models.SingleProcessLock(**kwargs)

  Table for storing one-at-time process lock. Lock a needed process by selecting row with FOR UPDATE for a guaranteed single-instance execution.

class luna_streams.db.streams_db_tools.models.streams_db_models.Stream(**kwargs)

  Database table model for streams.

luna_streams.db.streams_db_tools.models.streams_db_models.view(name, selectable)

  Create a simple view object. Use it like a table: select([SomeView.c.roi]) or SomeView.insert().values(name=’foo’).

  Parameters:

    - name (`str`) – view name

    - selectable – any selectable that has columns

  Return type:

    `TableClause`

  Returns:

    sa.table object (NOT Model)