SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 22/12/2011, 11:50 AM   #21
Slice
High-roller
 
Join Date: Mar 2008
Location: Sweden
Posts: 1,896
Reputation: 1590
Spray Re: SQLite Improved

Update!

Highlights:
  • Added two new types for stmt_bind_value:
    • DB::TYPE_WP_HASH: Puts a BLOB value of a whirlpool hash from the given string into the query (ex. x'FFAA4411...').
    • DB::TYPE_PLAYER_NAME: Puts a player name from the ID passed.
    Note that DB_USE_WHIRLPOOL must be defined as true in order for DB::TYPE_WP_HASH to work.
  • Added the preprocessor options DE_DEBUG (logs debug info) and DB_LOG_TO_CHAT (prints log messages to chat).
  • Improved the way results are dealt with internally to avoid crashes at all costs.
  • Added debug messages pretty much everywhere (shown if DB_DEBUG is true).

I'm also releasing an example of a gamemode with login and register commands using ZCMD and Whirlpool!
Download demo!

Last edited by Slice; 09/02/2012 at 07:29 PM. Reason: typo
Slice is offline   Reply With Quote
Old 07/02/2012, 08:27 AM   #22
Slice
High-roller
 
Join Date: Mar 2008
Location: Sweden
Posts: 1,896
Reputation: 1590
Spray Re: SQLite Improved

Whoop whoop! Minor, yet awesome update: db_get_field/db_get_field_assoc will no longer crash on NULL values!
Slice is offline   Reply With Quote
Old 07/02/2012, 09:05 AM   #23
antonio112
High-roller
 
antonio112's Avatar
 
Join Date: Aug 2009
Location: Romania
Posts: 974
Reputation: 87
Default Re: SQLite Improved

Woah, great work. I'll start learning SQLite from now. Keep up the good work and updates.
__________________
antonio112 is offline   Reply With Quote
Old 07/02/2012, 12:10 PM   #24
Niko_boy
High-roller
 
Niko_boy's Avatar
 
Join Date: Aug 2010
Location: Somewhere i belong
Posts: 1,423
Reputation: 138
Default Re: SQLite Improved

awesomnees slice
__________________
nope[IMG]http://*******/1r0SOkH_[/IMG]
•••[CLOSED]LCS•Freeroam•DM•Stunts•••AutoArena [0.3z][No SkinShot][sixtytiger.com]Want a decent Attack Defend Gamemode?
N/A176.31.229.148:7830Get This! Attack-Defend(v2.3.1)
Niko_boy is offline   Reply With Quote
Old 07/02/2012, 01:06 PM   #25
Luka P.
High-roller
 
Join Date: Feb 2009
Posts: 1,553
Reputation: 12
Default Re: SQLite Improved

Amazing as always, thanks!
Mirror: http://www.lpupak.com/dl/get/sqlitei.inc
Luka P. is offline   Reply With Quote
Old 09/02/2012, 12:21 PM   #26
Slice
High-roller
 
Join Date: Mar 2008
Location: Sweden
Posts: 1,896
Reputation: 1590
Spray Re: SQLite Improved

Update!

SQLitei has now taken a big step towards stability!

Highlights:
  • Improved stability on freeing results:
    • Freeing results twice will not crash the server anymore - it will just generate a warning.
    • Freeing a result that will be autoreleased will remove it from the autorelease pool.
  • Added db_query_int and db_query_float.
  • Added db_get_struct_info and db_set_struct_info; used mainly internally.
  • Added db_exec and db_insert.
  • Performance improvements!

Now these things are possible (with very little code):
pawn Code:
new uid = db_insert(db, "INSERT INTO blabla VALUES blabla");

if (uid) {
    // uid is now the index for whatever we just inserted
}
pawn Code:
printf("%d", db_query_int(db, "SELECT COUNT(*) FROM something"));
Slice is offline   Reply With Quote
Old 09/02/2012, 02:08 PM   #27
TheArcher
High-roller
 
TheArcher's Avatar
 
Join Date: Dec 2009
Location: Home
Posts: 2,417
Reputation: 251
Default Re: SQLite Improved

Why don't you improve MySQL?
__________________
TheArcher is offline   Reply With Quote
Old 09/02/2012, 02:12 PM   #28
Steven82
High-roller
 
Join Date: Nov 2009
Posts: 2,478
Reputation: 173
Default Re: SQLite Improved

This is awesome dude. Very well done, this will defiantly be in the next gamemode i decide to script using SQLite.
__________________
If you read my old posts; I apologize in advance.
Steven82 is offline   Reply With Quote
Old 09/02/2012, 02:17 PM   #29
Slice
High-roller
 
Join Date: Mar 2008
Location: Sweden
Posts: 1,896
Reputation: 1590
Default Re: SQLite Improved

Quote:
Originally Posted by TheArcher View Post
Why don't you improve MySQL?
The MySQL plugins are open-source, anyone can modify them where they should be - within the source code. This is not the case for SQLite, which is why I've decided to do my best in improving it.

@Steven82: Let me know if you run into problems or have any requests. Also, expect a few more updates with new features.
Slice is offline   Reply With Quote
Old 09/02/2012, 02:29 PM   #30
TheArcher
High-roller
 
TheArcher's Avatar
 
Join Date: Dec 2009
Location: Home
Posts: 2,417
Reputation: 251
Default Re: SQLite Improved

Quote:
Originally Posted by Slice View Post
The MySQL plugins are open-source, anyone can modify them where they should be - within the source code. This is not the case for SQLite, which is why I've decided to do my best in improving it.
For sure you need to have C++ knowlage, isn't it?
__________________
TheArcher is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] Improved aiming luby Filterscripts 70 19/09/2014 09:00 AM
[GameMode] SECOND RELEASE TDM: IMPROVED grantism Gamemode Scripts 5 15/10/2011 03:59 PM
Have I improved? BigAl Everything and Nothing 1 10/09/2011 12:17 AM
[Map] An improved LSPD Blacknight Maps 5 01/01/2011 04:21 PM
[Map] [MAP]Improved District im2fast4u Maps 2 06/10/2009 03:44 PM


All times are GMT. The time now is 11:41 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.