We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39052
    • 18 Posts
    Hi,
    I've read on old messages that Sqlite support was planned but not effective, but yet I see Sqlite pdo classes in the 2.2.0 pl2 package.
    So my question is : is it possible to use Sqlite as database ? It not proposed during the installation process, but I've the feeling that there isn't much to do.. (having programming skills myself, I can modify the database.tpl to open to Sqlite, but will it work ?)
    Thanks for reading.
    • SQLite driver support was implemented in xPDO, but the modX model has not been implemented against this driver. Currently, there are three driver implementations in xPDO, mysql, sqlite, and sqlsrv, but only two of them have been utilized in MODX at this point, mysql and sqlsrv.

      That said, though it would not take too much to implement the modX model for sqlite (create and build schema, override any methods with unsupported SQL, etc.), it is not a current priority for our core team. But I would certainly be willing to advise and assist anyone willing to work on a contribution like this.
        • 39052
        • 18 Posts
        Thanks for this quick answer smiley
        Well, if you give me all the inputs (file names) I shall modify, I'll be happy to bring my contribution to this project wink
          • 39052
          • 18 Posts
          Ok, I had a look at the code, and there are too many files to modify.. I'll go to another CMS.
          Thanks
          • Quote from: sushen at Mar 15, 2012, 09:17 AM
            Ok, I had a look at the code, and there are too many files to modify.. I'll go to another CMS.
            Thanks
            Sushen, are you familiar with xPDO at all? There are not really any files to modify. You just need to copy and modify the mysql schema files, alter them for sqlite where needed, generate the _sqlite class stubs that make up the model, and extend any methods with mysql specific conventions in those stubs as needed. It should be a fairly straightforward exercise since it has already been done for sqlsrv, which is much different from mysql than sqlite is.
              • 39052
              • 18 Posts
              No, I don't know xPDO - just basic pdo..
              I simply had a look at the 142 files in the core/model/modx/mysql and sqlsrv, and deducted I should also generate 142 files for sqlite, before going into other integration details... Seemed a little bit overkill to me to modify all this code instead of looking for another cms.
              And now that I understand there is a generator for these files, it also seems overkill to me to learn xPDO before modifying the code (instead of looking for another cms). It's not just as if I had to modify 4 or 5 files with more or less complex php ; it's easier and faster for me to do this instead of learning another new tech..

              Anyway thank you very much for your answers.