## odcs.OdcsContract


An ODCS contract as [read](odcs.read.md#sverify.odcs.read) gives it.


Usage

``` python
odcs.OdcsContract(
    document,
    tables=dict(),
    unread=list(),
)
```


## Attributes


`document: dict[str, Any]`  
The document as read.

`tables: dict[str, list[Condition]]`  
The conditions sverify reads, per schema object, in the document's order.

`unread: list[Unread]`  
The rules sverify cannot read, with the reason.


## Methods

| Name | Description |
|----|----|
| [conditions()](#conditions) | The conditions on schema object [table](Node.table.md#sverify.Node.table) (the only one by default), |
| [schema()](#schema) | The columns of schema object [table](Node.table.md#sverify.Node.table) and their types: the |

------------------------------------------------------------------------


#### conditions()


The conditions on schema object [table](Node.table.md#sverify.Node.table) (the only one by default),


Usage

``` python
conditions(table=None)
```


for `requires={"orders": ...}` or `ensures=...`.


##### Parameters


`table: str | None = None`  
The schema object's name. Default: the contract's only one.


##### Returns


`list[Condition]`  
The conditions: SQL strings, `sv.unique`, `sv.key`,

`sv.max_rows`, `sv.rows_per` and `sv.references`.


------------------------------------------------------------------------


#### schema()


The columns of schema object [table](Node.table.md#sverify.Node.table) and their types: the


Usage

``` python
schema(table=None)
```


physical type where DuckDB reads it, else the logical type.


##### Parameters


`table: str | None = None`  
The schema object's name. Default: the contract's only one.


##### Returns


`ibis.Schema`  
An Ibis schema.
