Esempio n. 1
0
    def __init__(self, sourcedb_name):
        self.host = hostmetadata()
        self.uuid = alnum_uuid()

        super().__init__(sourcedb_name)

        self.timelog = alias(self.database_path, 'pylily_manidb_timelog')
Esempio n. 2
0
 def __init__(self, database_path, table_name):
     self.uuid = alnum_uuid()
     self.host = hostmetadata()
     self.begtime = datetime.now()
     self.msgtime = [['beg', self.begtime, 0]]
     self.table_name = table_name
     self.database_path = database_path
Esempio n. 3
0
    def __init__(self, sourcedb_path):

        self.host = hostmetadata()
        self.uuid = alnum_uuid()
        self.date = datetime.now().strftime('%Y%m%d')
        self.tbeg = datetime.now()
        self.sourcedb_path = sourcedb_path

        super().__init__(':memory:')
        source = database(sourcedb_path)
        source.connect.backup(self.connect, pages=20, sleep=0.0001)
        del source
Esempio n. 4
0
    def __init__(self):
        self.tw_county_code_list = [
            '10002', '10004', '10005', '10007', '10008', '10009', '10010',
            '10013', '10014', '10015', '10016', '10017', '10018', '10020',
            '63000', '64000', '65000', '66000', '67000', '68000', '91000',
            '92000'
        ]

        self.ktt_county_code_list = ['63000', '65000', '10002']

        self.ol_county_code_list = ['10016', '91000', '92000']

        self.uuid = alnum_uuid()
        self.host = hostmetadata()
        self.begtime = datetime.now()
        self.msgtime = [['beg', self.begtime, 0]]
Esempio n. 5
0
    def __init__(self, sourcedb_filename):
        self.host = hostmetadata()
        self.uuid = alnum_uuid()[-6:]
        self.date = datetime.now().strftime('%Y%m%d')
        self.tbeg = datetime.now()

        self.metadata_table = 'pylily_sunday_leftjoin_geom'
        self.bufferdb_directory = '{0}/{1}'.format(self.host.factory,
                                                   self.metadata_table)

        if not os.path.exists(self.bufferdb_directory):
            os.mkdir(self.bufferdb_directory)

        bufferdb_filename = '{0}/{1}_{2}.sqlite'.format(
            self.bufferdb_directory, self.date, self.uuid[-6:])

        self.bufferdb_name, self.bufferdb_extension = os.path.splitext(
            bufferdb_filename)

        super().__init__(sourcedb_filename)
        self.uuid = self.uuid[-6:]
        self.timer('Construction database({0}) Accompilished'.format(
            sourcedb_filename))
Esempio n. 6
0
 def __init__(self):
     self.uuid = alnum_uuid()
     self.host = hostmetadata()
     self.begtime = datetime.now()
     self.msgtime = [['beg', self.begtime, 0]]