Implement SQLite for Nimda3#26
Open
DBX12 wants to merge 9 commits into
Open
Conversation
Keywords true, false and null are now correctly parsed as their PHP equivalents.
Add an interface defining common functions for all database types
SQLite and MySQL differ too much to "translate" MySQL statements to SQLite statements. This file creates / updates the SQLite database to the update 10 of MySQL. Still setting the update counter to one to prevent bogus behavior on new updates.
- refactored Nimda::MySQL to Nimda::database - added conditional initialisation of $database - added conditional update_file - moved handling of permanent variables to DatabaseInterface (and made database classes responsible for escaping and querying) - added call to DatabaseInterface::closeConnection() to __destruct()
- added conditional initialization of $database for the creation of the Plugin
- added function to implement DatabaseInterface in MySQL - adapt constructor to match DatabaseInterface
LPT: Do not attempt to close a database connection if there is no connection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I saw Nimda3 lacks support for SQLite and many small instances of Nimda (like on Raspi or Odroid) do not have the resources or do not want to sacrifice them for a MySQL database.
So hopefully this helps people in the future as it will help me.
Cheers
DBX12