Results 1 to 6 of 6

Thread: [WIP] SQLite support for libcod

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    The async support has been added and so far has been more or less stable, but still quite experimental for now.

    Currently limited to 256 rows/fields max and 512 async tasks max (you proably won't come even close to that limit).

    Also added fixes to free task/db connections on map change/restart.

    How to use async:

    Init your async sqlite at gametype start:

    PHP Code:
    async_sqlite_initialize(); 
    Execute your query:

    PHP Code:
    async_sqlite_create_query(level.yourdb"SELECT SQLITE_VERSION()", ::callbackFunc"somearg");


    callbackFunc(rowsarg)
    {
        
    printf("%\n"rows[0][0]);

    Else is similar to sqlite_query.
    sudo apt-get rekt

  2. The Following 2 Users Say Thank You to voron00 For This Useful Post:

    kung foo man (31st October 2017),Lonsofore (1st November 2017)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •