Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        def initialize_ids(db, cursor):
    # Respositories
    cursor.execute(statement("SELECT max(id) from repositories", db.place_holder))
    id = cursor.fetchone()[0]
    if id is not None:
        DBRepository.id_counter = id + 1

    # Log
    cursor.execute(statement("SELECT max(id) from scmlog", db.place_holder))
    id = cursor.fetchone()[0]
    if id is not None:
        DBLog.id_counter = id + 1

    # Actions
    cursor.execute(statement("SELECT max(id) from actions", db.place_holder))
    id = cursor.fetchone()[0]
    if id is not None:
        DBAction.id_counter = id + 1

    # Copies
    cursor.execute(statement("SELECT max(id) from file_copies", db.place_holder))
    id = cursor.fetchone()[0]
    if id is not None:
        DBFileCopy.id_counter = id + 1

    # Files
    cursor.execute(statement("SELECT max(id) from files", db.place_holder))
    id = cursor.fetchone()[0]
    if id is not None:
        DBFile.id_counter = id + 1

    # File Links
    cursor.execute(statement("SELECT max(id) from file_links", db.place_holder))
    id = cursor.fetchone()[0]
    if id is not None:
        DBFileLink.id_counter = id + 1

    # Branches
    cursor.execute(statement("SELECT max(id) from branches", db.place_holder))
    id = cursor.fetchone()[0]
    if id is not None:
        DBBranch.id_counter = id + 1

    # People
    cursor.execute(statement("SELECT max(id) from people", db.place_holder))
    id = cursor.fetchone()[0]
    if id is not None:
        DBPerson.id_counter = id + 1

    # Tags
    cursor.execute(statement("SELECT max(id) from tags", db.place_holder))
    id = cursor.fetchone()[0]
    if id is not None:
        DBTag.id_counter = id + 1

    # Tag revisions
    cursor.execute(statement("SELECT max(id) from tag_revisions", db.place_holder))
    id = cursor.fetchone()[0]
    if id is not None:
        DBTagRev.id_counter = id + 1
        


src/c/v/CVSAnalY-HEAD/pycvsanaly2/main.py   CVSAnalY(Download)

src/m/i/MininGit-HEAD/pycvsanaly2/main.py   MininGit(Download)
from ParserFactory import (create_parser_from_logfile,
    create_parser_from_repository)
from Database import (create_database, TableAlreadyExists, AccessDenied,
    DatabaseNotFound, DatabaseDriverNotSupported, DBRepository, statement,
    initialize_ids, DatabaseException)
                                 db.place_holder), (uri,))
        rep = cursor.fetchone()
        initialize_ids(db, cursor)
        cursor.close()