Back to bricks list
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version

Credentials

Model class with created_by and last_modified_by columns automatically provided

:param Model: [description] :type Model: [type] :return: [description] :rtype: [type]

Attributes
data: Dicttype: CredentialsType
Functions
__INIT__

Initialize self. See help(type(self)) for accurate signature.

CLONE
COERCE
_coerce : bool - True
DELETE_INSTANCE
recursive : bool - False
delete_nullable : bool - False
DEPENDENCIES
search_nullable : bool - False
GET_CREDENTIALS_DATA_TYPE
Return type : Type
GET_DATA_OBJECT
Return type : CredentialsDataBase
GET_ID
IS_ALIAS
IS_DIRTY
IS_SAVED

Returns True if the model is saved in db, False otherwise

Return type : bool
REFRESH
Return type : ModelType
SAVE

Sets the data set force_insert to True to force creation of the object set skip_hook to True to skip the before insert or update hook

Return type : ModelType
TO_DTO
Return type : CredentialsDTO
UNWRAP
ADD_INDEX - @classmethod
fields : Any
AFTER_ALL_TABLES_INIT - @classmethod

Method call after all the table are inited

Useful when use DeferredForeignKey to create the foreign key manually latter

AFTER_TABLE_CREATION - @classmethod

Method call after the table is created

Usefull to create the full text indexes

ALIAS - @classmethod
Alias : Any
BIND - @classmethod
database : Any
bind_refs : bool - True
bind_backrefs : bool - True
_exclude : Any
BIND_CTX - @classmethod
database : Any
bind_refs : bool - True
bind_backrefs : bool - True
BULK_CREATE - @classmethod
model_list : Any
batch_size : Any
BULK_UPDATE - @classmethod
model_list : Any
fields : Any
batch_size : Any
CLASSNAME - @classmethod

Returns the name of the class

slugify : bool - False
True to slugify the class name if True
snakefy : bool - False
True to snakefy the class name if True
replace_uppercase : bool - False
Replace upper cases by "-" if True
Return type : str
COLUMN_EXISTS - @classmethod

Returns True if the column exists in the table

column_name : str
The column name
Return type : bool
CREATE - @classmethod
query : Any
CREATE_FOREIGN_KEY_IF_NOT_EXIST - @classmethod

Create a foreign key for a Foreign key field only if the foreign key does not exists

field : ForeignKeyField
[description]
CREATE_FULL_TEXT_INDEX - @classmethod

Method to create a full text index

columns : List
[description]
index_name : str
CREATE_TABLE - @classmethod

Create model table

DELETE - @classmethod
DELETE_BY_ID - @classmethod
pk : Any
DROP_TABLE - @classmethod

Drop model table

EXECUTE_SQL - @classmethod

Execute a raw SQL query. Can use the [TABLE_NAME] to replace by the table name

query : str
The query to execute
FILTER - @classmethod
dq_nodes : Any
filters : Any
FIND_BY_NAME - @classmethod
Name : str
Return type : Optional
FIND_BY_NAME_AND_CHECK - @classmethod
Name : str
type_ : CredentialsType
Return type : Credentials
FOREIGN_KEY_EXISTS - @classmethod
column_name : str
Return type : bool
FULL_CLASSNAME - @classmethod

Returns the full name of the class

slugify : bool - False
Slugify the returned class name if True
snakefy : bool - False
Snakefy the returned class name if True
Return type : str
GET - @classmethod
query : Any
filters : Any
GET_BY_ID - @classmethod
id : str
Return type : Optional
GET_BY_ID_AND_CHECK - @classmethod

Get by ID and throw 404 error if object not found

id : str
[description]
Return type : ModelType
GET_BY_IDS - @classmethod
ids : List
Return type : List
GET_DATA_TYPES - @classmethod
Return type : Dict
GET_DB - @classmethod
Return type : DatabaseProxy
GET_DB_MANAGER - @classmethod

Returns the (current) DbManager of this model

Return type : Type
GET_OR_CREATE - @classmethod
GET_OR_NONE - @classmethod
query : Any
filters : Any
GET_TABLE_NAME - @classmethod

Returns the table name of this class

Return type : str
INDEX - @classmethod
fields : Any
INDEX_EXISTS - @classmethod

Returns True if the index exists in the table

index_name : str
The index name
Return type : bool
INHERITORS - @classmethod

Get all the classes that inherit this class

Return type : List
INSERT - @classmethod
_Model__data : Any
insert : Any
INSERT_FROM - @classmethod
query : Any
fields : Any
INSERT_MANY - @classmethod
rows : Any
fields : Any
IS_MYSQL_ENGINE - @classmethod
NOOP - @classmethod
RAW - @classmethod
sql : Any
params : Any
REPLACE - @classmethod
_Model__data : Any
insert : Any
REPLACE_MANY - @classmethod
rows : Any
fields : Any
SAVE_ALL - @classmethod
SEARCH_BY_NAME - @classmethod
Name : str
Return type : ModelSelect
SEARCH_BY_NAME_AND_TYPE - @classmethod
Name : str
type_ : CredentialsType
Return type : ModelSelect
SEARCH_BY_TYPE - @classmethod
type_ : CredentialsType
Return type : ModelSelect
SELECT - @classmethod
fields : Any
SET_BY_ID - @classmethod
key : Any
value : Any
TABLE_EXISTS - @classmethod
TRUNCATE_TABLE - @classmethod
options : Any
UPDATE - @classmethod
_Model__data : Any
update : Any
VALIDATE_MODEL - @classmethod
COPY - @staticmethod
method : Any