helpers#

sqlalchemy_mate.patterns.large_binary_column.helpers.encode_pk(pk: Union[str, int, Iterable[Union[str, int]]], is_pk_url_safe: bool, delimiter: str = '/') str[source]#
Parameters:
  • pk – primary key of the row. It could be a single value or a list of values (when pk is compound).

  • is_pk_url_safe – whether the primary key is URL safe. If it’s not, you need to encode it with b64encode.

  • delimiter – the delimiter to join the primary key values.

sqlalchemy_mate.patterns.large_binary_column.helpers.execute_write(write_function: Callable, write_kwargs: Dict[str, Any], check_exists_function: Optional[Callable] = None, check_exists_kwargs: Optional[Dict[str, Any]] = None) bool[source]#
Returns:

a boolean flag indicating whether the write operation is executed.