Logo Search packages:      
Sourcecode: ibus-pinyin version File versions

def pysqlitedb::PYSQLiteDB::create_tables (   self,
  database = "main" 
)

create all phrases tables that contain all phrases

Definition at line 97 of file pysqlitedb.py.

00097                                                :
        """create all phrases tables that contain all phrases"""

        try:
            self.db.executescript ("PRAGMA default_cache_size = 5000;")
            self.flush (True)
        except:
            pass

        # create pinyin table
        sqlstring = "CREATE TABLE IF NOT EXISTS %s.py_pinyin (pinyin TEXT PREMARY KEY);" % database
        self.db.execute (sqlstring)

        # create pinyin table
        sqlstring = "CREATE TABLE IF NOT EXISTS %s.py_shengmu (shengmu TEXT PREMARY KEY);" % database
        self.db.execute (sqlstring)

        # create phrase table
        sqlstring = """CREATE TABLE IF NOT EXISTS %(database)s.py_phrase (
                            ylen INTEGER,
                            y0 INTEGER, y1 INTEGER, y2 INTEGER, y3 INTEGER, yx TEXT,
                            s0 INTEGER, s1 INTEGER, s2 INTEGER, s3 INTEGER,
                            phrase TEXT,
                            freq INTEGER, user_freq INTEGER);"""

        self.db.executescript (sqlstring % { "database":database })
        self.flush (True)

    def generate_userdb_desc (self):


Generated by  Doxygen 1.6.0   Back to index