Raised This Month: $32 Target: $400
 8% 

How the DB Natives were ported to methodmaps?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Papero
Veteran Member
Join Date: Aug 2016
Location: Italy
Old 03-29-2018 , 17:43   How the DB Natives were ported to methodmaps?
Reply With Quote #1

Hi,

I was about to start using sql on my plugins but I've some doubts:

Why:
PHP Code:
SQL_Query(Handle database, const char[] queryint len); 
Is a non-threaded but
PHP Code:
db.Query(SQLQueryCallback callback, const char[] queryany dataDBPriority prio); 
it is?

Didn't all the DB Natives "method mapped", did they? :

PHP Code:
SQL_LockDatabase(Handle database); 
but
PHP Code:
database.Lock(); 
doens't exists.

I wrote only a few examples but there're more.

Thanks!
__________________
My Plugins
SPCode


Steam: hexer504
Telegram: Hexah
Discord: Hexah#6903

If you like my work you can donate here!

Last edited by Papero; 04-05-2018 at 16:04.
Papero is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-29-2018 , 17:52   Re: How the DB Natives was ported to methodmaps?
Reply With Quote #2

db.Query corresponds to SQL_TQuery, not SQL_Query.

Edit: This is because threaded queries are recommended for normal database operations.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 03-29-2018 at 18:11.
Powerlord is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 03-29-2018 , 18:31   Re: How the DB Natives was ported to methodmaps?
Reply With Quote #3

I think this was intentional since they're trying to move away from non threaded queries, so these old natives won't be supported.
hmmmmm is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 22:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode