示例#1
0
def createStatement(args, traverser, node, wrapper):
    """
    Handles calls to `createStatement`, returning an object which emits
    warnings upon calls to `execute` and `executeStep` rather than
    `executeAsync`.
    """
    _check_dynamic_sql(args, traverser)
    from predefinedentities import build_quick_xpcom
    return build_quick_xpcom("createInstance", "mozIStorageBaseStatement",
                             traverser, wrapper=True)
示例#2
0
def createStatement(args, traverser, node, wrapper):
    """
    Handles calls to `createStatement`, returning an object which emits
    warnings upon calls to `execute` and `executeStep` rather than
    `executeAsync`.
    """
    _check_dynamic_sql(args, traverser)
    from predefinedentities import build_quick_xpcom
    return build_quick_xpcom('createInstance', 'mozIStorageBaseStatement',
                             traverser, wrapper=True)
示例#3
0
def create_preference_branch(arguments, traverser, node, wrapper):
    """Creates a preference branch, which can be used for testing composed
    preference names."""

    if arguments:
        arg = traverser._traverse_node(arguments[0])
        if arg.is_literal():
            # Avoid import loop
            from predefinedentities import build_quick_xpcom
            res = build_quick_xpcom('createInstance', 'nsIPrefBranch',
                                    traverser, wrapper=True)
            res.value['preference_branch'] = actions._get_as_str(arg)
            return res
示例#4
0
def create_preference_branch(arguments, traverser, node, wrapper):
    """Creates a preference branch, which can be used for testing composed
    preference names."""

    if arguments:
        arg = traverser._traverse_node(arguments[0])
        if arg.is_literal():
            # Avoid import loop
            from predefinedentities import build_quick_xpcom
            res = build_quick_xpcom('createInstance', 'nsIPrefBranch',
                                    traverser, wrapper=True)
            res.value['preference_branch'] = actions._get_as_str(arg)
            return res