Skip to content
  1. Mar 29, 2019
    • Yuanle Song's avatar
      v0.101.0 redesign use of main and user database. · 8b6cf027
      Yuanle Song authored
      the old design have flaws and limitations. see :id001: and :id002: in
      operational file.
      
      new design:
      
      open :memory: db readwrite, this will be the m_db handler.
      
      try attach main db at known path (readonly if possible) to "maindb".
      if failed, try next known path,
      if all failed, initDB() should return false and gave up.
      
      try attach user db at known path to "userdb" schema, if failed,
      create :memory: db and initialize it as user db. attach it as "userdb"
      schema.
      
      update all query against main db to query from maindb.* table.
      update all SQL against user db to run again userdb.* table.
      
      benefits:
      - access to user db is concurrent safe. multiple libpyzy app won't overwrite
        user's user db file and lose data.
      - there is no need to saveUserDB() using timer in the bg.
      - there is no need to copy data from user db to :memory:, if user db is
        large, this can lower memory usage.
      8b6cf027
  2. Mar 28, 2019
    • Yuanle Song's avatar
      v0.100.1 code review for Database.cc · 95b8f0b6
      Yuanle Song authored
      - add error handling for all db operations
      - refactoring Database.cc to make it more readable.
        add doc for Database.cc
        extract method copyDB(), initUserDB(), setPragmaOnMainDB()
      - fix old timeoutCallback(), now named cb_saveUserDB()
        saveUserDB() should not be in the condition, because save can fail endlessly
        if file system have problem.
      - no longer require main db to be a regular file. symlink should work fine.
      - drop the dreaded overly reused class variable m_buffer. use meaningful names
        in current context.
      - escape string in SQL statements
      - update meson.build
        add prefix in PKGDATADIR
        define glib logging domain
        disable glib asserts for release build
      - I will use so file version in git log.
      95b8f0b6
    • Yuanle Song's avatar
      add meson.build for libpyzy project. · 43004d6f
      Yuanle Song authored
      updated meson.build for pinyin_parser/ sub project.
      it integrates swig build step in meson now.
      43004d6f
    • Yuanle Song's avatar
      add pinyin_parser/ subproject. · f6eaead1
      Yuanle Song authored
      it builds the libpinyin_parser.so python module.
      f6eaead1
  3. Feb 07, 2013
  4. Dec 17, 2012
  5. Aug 02, 2012
  6. Jul 12, 2012
  7. Jul 10, 2012
  8. Jul 09, 2012
  9. Jun 12, 2012
  10. Jun 11, 2012
  11. Jun 07, 2012
  12. Jun 06, 2012
  13. May 25, 2012
  14. May 21, 2012
  15. May 18, 2012
  16. May 17, 2012
  17. May 11, 2012
  18. May 08, 2012
  19. Apr 26, 2012
  20. Mar 28, 2012
  21. Mar 27, 2012
  22. Mar 22, 2012
  23. Mar 07, 2012
  24. Feb 29, 2012
  25. Feb 13, 2012
  26. Jan 12, 2012
  27. Dec 05, 2011
  28. Dec 01, 2011
  29. Nov 22, 2011
  30. Nov 15, 2011
  31. Nov 11, 2011