コード例 #1
0
def writeConnectionPoolADB( runtime ):
        outfileName = paths.getPaths().srcDir + 'connection_pool.adb'
        template = Template( file=templatesPath()+"connection_pool.adb.tmpl" )
        template.date = datetime.datetime.now()
        template.customImports = readLinesBetween( outfileName, ".*CUSTOM.*IMPORTS.*START", ".*CUSTOM.*IMPORT.*END" )
        template.customTypes = readLinesBetween( outfileName, ".*CUSTOM.*TYPES.*START", ".*CUSTOM.*TYPES.*END" )
        template.customProcs = readLinesBetween( outfileName, ".*CUSTOM.*PROCS.*START", ".*CUSTOM.*PROCS.*END" )

        outfile = file( outfileName, 'w' );
        outfile.write( str(template) )
        outfile.close() 
コード例 #2
0
def makeDriverCommons():
        """
        Write versions of support files  db_commons-odbc to src/
        We just add some headers to each; otherwise they're uncustomised.
        """
        targets = [ 'db_commons-odbc' ]
        exts = [ 'adb', 'ads' ]
        for target in targets:
                for ext in exts:
                        outfileName = paths.getPaths().srcDir + target+"."+ext
                        template = Template( file=templatesPath()+target+"."+ext+"."+"tmpl" )
                        template.customImports = readLinesBetween( outfileName, ".*CUSTOM.*IMPORTS.*START", ".*CUSTOM.*IMPORT.*END" )
                        template.customTypes = readLinesBetween( outfileName, ".*CUSTOM.*TYPES.*START", ".*CUSTOM.*TYPES.*END" )
                        template.customProcs = readLinesBetween( outfileName, ".*CUSTOM.*PROCS.*START", ".*CUSTOM.*PROCS.*END" )
                        template.date = datetime.datetime.now()
                        outfile = file( outfileName, 'w' );
                        outfile.write( str(template) )
                        outfile.close()
コード例 #3
0
def makeDriverCommons():
        """
        """
        targets = [ 'db_commons-psql' ]
        exts = [ 'adb', 'ads' ]
        for target in targets:
                for ext in exts:
                        outfileName = paths.getPaths().srcDir + target+"."+ext
                        template = Template( file=templatesPath()+target+"."+ext+"."+"tmpl" )
                        template.customImports = readLinesBetween( outfileName, ".*CUSTOM.*IMPORTS.*START", ".*CUSTOM.*IMPORT.*END" )
                        template.customTypes = readLinesBetween( outfileName, ".*CUSTOM.*TYPES.*START", ".*CUSTOM.*TYPES.*END" )
                        template.customProcs = readLinesBetween( outfileName, ".*CUSTOM.*PROCS.*START", ".*CUSTOM.*PROCS.*END" )
                        template.date = datetime.datetime.now()
                        #outfile = file( outfileName, 'w' );
                        #outfile.write( str(template) )
                        #outfile.close()
                        conditionalWrite( outfileName, str( template ))
        
        return