add:SmallInteger()
This commit is contained in:
@ -347,6 +347,34 @@ Accepts required and optional parameters that each column type accepts.
|
||||
|
||||
`sqlalchemy Column`: initialized column with proper options
|
||||
|
||||
<a name="fields.model_fields.SmallInteger"></a>
|
||||
## SmallInteger Objects
|
||||
|
||||
```python
|
||||
class SmallInteger(Integer, int)
|
||||
```
|
||||
|
||||
SmallInteger field factory that construct Field classes and populated their values.
|
||||
|
||||
<a name="fields.model_fields.SmallInteger.get_column_type"></a>
|
||||
#### get\_column\_type
|
||||
|
||||
```python
|
||||
| @classmethod
|
||||
| get_column_type(cls, **kwargs: Any) -> Any
|
||||
```
|
||||
|
||||
Return proper type of db column for given field type.
|
||||
Accepts required and optional parameters that each column type accepts.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `kwargs` (`Any`): key, value pairs of sqlalchemy options
|
||||
|
||||
**Returns**:
|
||||
|
||||
`sqlalchemy Column`: initialized column with proper options
|
||||
|
||||
<a name="fields.model_fields.Decimal"></a>
|
||||
## Decimal Objects
|
||||
|
||||
|
||||
@ -69,6 +69,19 @@ Each of the `Fields` has assigned both `sqlalchemy` column class and python type
|
||||
!!!tip
|
||||
For explanation of other parameters check [pydantic][pydantic] documentation.
|
||||
|
||||
### SmallInteger
|
||||
|
||||
`SmallInteger(minimum: int = None,
|
||||
maximum: int = None,
|
||||
multiple_of: int = None)` has no required parameters.
|
||||
|
||||
* Sqlalchemy column: `sqlalchemy.SmallInteger`
|
||||
* Type (used for pydantic): `int`
|
||||
|
||||
!!!tip
|
||||
For explanation of other parameters check [pydantic][pydantic] documentation.
|
||||
|
||||
|
||||
### Float
|
||||
|
||||
`Float(minimum: float = None,
|
||||
|
||||
@ -636,6 +636,7 @@ Available Model Fields (with required args - optional ones in docs):
|
||||
* `DateTime()`
|
||||
* `JSON()`
|
||||
* `BigInteger()`
|
||||
* `SmallInteger()`
|
||||
* `Decimal(scale, precision)`
|
||||
* `UUID()`
|
||||
* `LargeBinary(max_length)`
|
||||
|
||||
Reference in New Issue
Block a user