#!/usr/bin/env python
# -*- coding: utf-8 -*-

'''It applies the standard functions to :mod:`mosql.util`.

The usage:

::

    import mosql.std

If you want to patch again:

::

    mosql.std.patch()

It will replace the functions in :mod:`mosql.util` with original standard functions.
'''

import mosql.util

def patch():
    mosql.util.escape = mosql.util.std_escape
    mosql.util.format_param = mosql.util.std_format_param
    mosql.util.delimit_identifier = mosql.util.std_delimit_identifier
    mosql.util.stringify_bool = mosql.util.std_stringify_bool
    mosql.util.escape_identifier = mosql.util.std_escape_identifier

patch() # patch it when load this module

allow to apply std functions back