Spigot MySQL API 3.6

A simplified API that will help you work with your Minecraft related database.

  1. thanks for listGet()!
     
  2. Vagdedes

    Supporter

    Vagdedes updated MySQL API with a new update entry:

    Version 2.6

    Read the rest of this update entry...
     
  3. Vagdedes

    Supporter

  4. How do I disable SSL?
     
  5. Vagdedes

    Supporter

    SSL? My plugin doesn't interact with certificates.
     
  6. Never mind, I get rid of SSL warnings by adding
    Code (Text):
    ?useSSL=false
    at the back of my database name. Sorry for bothering.
     
  7. Vagdedes

    Supporter

    Vagdedes updated MySQL API with a new update entry:

    Version 2.8

    Read the rest of this update entry...
     
  8. Vagdedes

    Supporter

  9. Vagdedes

    Supporter

    Vagdedes updated MySQL API with a new update entry:

    Version 3.0

    Read the rest of this update entry...
     
    #49 Vagdedes, Dec 31, 2019
    Last edited: Jan 1, 2020
  10. Vagdedes

    Supporter

  11. Vagdedes

    Supporter

    Vagdedes updated MySQL API with a new update entry:

    Version 3.2

    Read the rest of this update entry...
     
    • Like Like x 1
  12. Is maven available?
     
  13. Vagdedes

    Supporter

    No
     
  14. This API runs on the main server thread correct?
     
  15. Vagdedes

    Supporter

    Yes, but moving it to another is no difficult process.
     
  16. Do the mysql queries work async in this plugin? I want to make a system that pauses a player login in order to retrieve their data in another thread similar to what plugins like ViaVersion do. This way MySQL queries would never block the main thread from working.
     
  17. Vagdedes

    Supporter

    You can use the Bukkit.getScheduler().runAsynchronously() method to run a task asynchronously. I've made an example on the plugin's page.
     
    #57 Vagdedes, Jul 12, 2020
    Last edited: Jul 12, 2020
  18. bug- it seems like this plugin will sometimes close the connection by itself but only when i have one of my columns set to mediumtext instead of text (the length is important due to how I store some data currently). If I run the manual disconnect command at this time it would say the database is already not connected. The plugin does manage to reconnect fine every time I run a query, so everything works, but it outputs an annoying "SQL connected." message when it does so.

    Could you please fix this console spam? I don't really care about latency since I am doing everything async and I am accounting for ping to database anyways in my design, so if the plugin still keeps reconnecting then so be it.
     
    • Useful Useful x 1
  19. Another thing I noticed:

    the plugin is not synchronized. It will unpredictably glitch out if multiple threads access the database at once (for instance, sometimes in the server thread and other times in another thread)

    I think you should make all methods in the public-facing API synchronized to MySQL.class (or make a version of each that is synchronized).
    It adds minimal overhead considering that MySQL access is much slower than the time it takes to synchronize, and makes sure that this kind of glitch doesn't happen with multithreaded use.

    Here's a synchronized wrapper for if anyone else needs it. I omitted the ones that just create/delete tables since they are not useful to me.
    https://pastebin.com/xyuW4Pmc

    Thanks for this amazing API regardless, as it probably saved me days of time compared to doing it from scratch.
     
    #59 HSIkMy, Jul 26, 2020
    Last edited: Jul 26, 2020
    • Like Like x 1
  20. Hey there, looks interesting. Just a few questions:
    - Does it use conection pools? (for example hikari)
    - Can you choose the type of data storage for a column?
    - Is there any way to use this for sqlite?
    -Any updates on the bug @HSIkMy posted?

    Thanks for sharing it!