gensaschema.constraints module¶
Constraint Declarators¶
Helper functions to define constraints. These will be part of the generated schema modules. Copy or the reference the module where needed. The location is configurable.
Copyright: | Copyright 2010 - 2018 André Malo or his licensors, as applicable |
---|---|
License: | Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
-
gensaschema.constraints.
ForeignKey
(columns, refcolumns, **kwargs)¶ Append foreign key
Parameters: - columns : sequence
Source columns
- refcolumns : sequence
Referred columns
- kwargs :
dict
Additional parameters
-
gensaschema.constraints.
PrimaryKey
(*columns, **kwargs)¶ Append primary key
Parameters: - columns :
tuple
Constraint columns
- kwargs :
dict
Additional parameters
- columns :
-
gensaschema.constraints.
Unique
(*columns, **kwargs)¶ Append unique constraint
Parameters: - columns :
tuple
Constraint columns
- kwargs :
dict
Additional arguments
- columns :