Skip to content

remove dependency on Database.h, use sqlite3 C interface instead#87

Open
kottochii wants to merge 2 commits into
thoth-tech:mainfrom
kottochii:fix_database_dependencies
Open

remove dependency on Database.h, use sqlite3 C interface instead#87
kottochii wants to merge 2 commits into
thoth-tech:mainfrom
kottochii:fix_database_dependencies

Conversation

@kottochii
Copy link
Copy Markdown

Description

From one of the old builds of SplashKit, the Database (and linkage to sqlite) class has been deleted. This change aims to remove the dependency on the functionality, and instead, use the sqlite API. The makefile will also attempt to link sqlite from default directory. If binaries are to be found in a non-standard location, the user will have to modify the makefile.

This change will not necessarily work for all Windows machines

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I made some local changes to ensure that the databases are actually queried (like ensuring that the user is rating the game at the end, and is able to see the new ratings).

Testing Checklist

  • Tested in Linux (Ubuntu 24.04.4 LTS)

Checklist

If involving code

  • My code follows the style guidelines of this project - NOTE: this is one of the only C libraries used in the project, change to smart pointers should be considered
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Folders and Files Added/Modified

  • Modified:
    • Makefile
    • include/Database.h
    • include/GameData.h

Additional Notes

This change does not resolve any other issues, such as that the database functions are simply not used. In order to test the functionality of the changes, you will have to ensure that the program is attempting to use the database.

As the sqlite's C API is used, any pointer will be alive and in the memory until it is deleted (in this case, by the corresponding sqlite functions). Please double check that these functions are present for every exit point of the functions.

@seventhback777
Copy link
Copy Markdown

A very easy way to make arcade machine live agian,but we need it indeed now,hope the next team can have a better solution,great,I approve this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants