Jump to content
  • 0

Custom SQL Calls


Randomness

Question

I read the wiki page, but I still dont completely understand how this works. Could someone perhaps explain how to use this to save / update data? Preferably give a bunch of examples so i can see how its used (or is this only used to LOAD info?)

Also does this:

 

 

DbName in TBLNAME is either Character or Object The requested Table must be previously-enabled for custom data queries through HiveExt.ini

 

mean we cannot use this for custom tables?

Link to comment
Share on other sites

Recommended Posts

  • 0

Cant someone please make a 998, 999 version of the hiveext.dll for 1042 ?

 

Or at least (to the developers) allow us to have some custom tables in the HiveExt.ini, besides the freaking object_data and players_data....

I dont understand why devs have this stubborn view on 999 queries. Every other dayz mod has them, whats so special about epoch that with 999 all hell will break lose. Is it that unstable or hackable...wtf ?

And besides isnt it up the server admin to mess it up ?

 

At least release 2 hiveext.dlls.....one with 999 and one without....People have been begging for this for months now.

You dont see a lot of people requesting it...cause lets face it....80% of the people here are not writing scripts.

Link to comment
Share on other sites

  • 0

what about CHILD:500 calls. the in code doc says this:

 

//CHILD:500:SUPERKEY:ALLOWTABLES:REMOVEALLOWTABLES:

//ALLOWTABLES and REMOVEALLOWTABLES can either be a string or array of strings
//each represents a table in format DbType.TableName to be allowed/removed from allow list
//having them both blank or missing will give you a result of all the currently allowed tables
//in format ["PASS",["Character.Table1","Object.Table2"]]
//an invalid string for any of the table names would make the whole method fail with
//["ERROR",ERRORDESCR]
//otherwise, the return format is
//["PASS",DUPLICATEALLOWED,REMOVEMISSING]
//where DUPLICATEALLOWED is an array of tables which you have now allowed, but were allowed anyway
//and REMOVEMISSING is an array of tables which you wanted to remove from the allow list, but they weren't there

https://github.com/vbawol/DayZhiveEpoch/blob/9e09db3af6093f682e8db7cae17235a8e730ff3a/Hive/Source/HiveLib/HiveExtApp.cpp#L1014-L1024

 

you can also check the other functions they are good documented in code (maybe better then in the wiki itself)

if that doesn't help look at the actual implementation here (if you can read some c++, just give it a try): https://github.com/vbawol/DayZhiveEpoch/blob/master/Hive/Source/HiveLib/DataSource/CustomDataSource.cpp

Link to comment
Share on other sites

  • 0

what about CHILD:500 calls. the in code doc says this:

https://github.com/vbawol/DayZhiveEpoch/blob/9e09db3af6093f682e8db7cae17235a8e730ff3a/Hive/Source/HiveLib/HiveExtApp.cpp#L1014-L1024

 

you can also check the other functions they are good documented in code (maybe better then in the wiki itself)

if that doesn't help look at the actual implementation here (if you can read some c++, just give it a try): https://github.com/vbawol/DayZhiveEpoch/blob/master/Hive/Source/HiveLib/DataSource/CustomDataSource.cpp

 

Yeah but those are only allowed for tables characters_data, and objects_data...not any custom table....like for example the good old instance_buildings.

DbName in TBLNAME is either Character or Object.....

 

I want to make my own table with my own cells and query that as well....with select, update and delete...

 

And besides like you said....they re-invented the wheel...instead of just enabling 999, 998 calls....As if we dont have tons of hackers right now messing with the servers.....THATS gonna save us T_T.

Link to comment
Share on other sites

  • 0

If the fear of 999 calls is things such as DROP TABLE, can't you add some custom tables?

 

custom_table1, custom_table2, etc. One column autoincrementing and the rest being just numbered so we can use it for what we want.

 

Exactly....thats what i said 4 months ago....Or if you guys are afraid of the custom SQL, then have 2 users in the hiveext.ini....One is for normal epoch crap, and one for read only db stuff.

We create a read only/update user in the database and you use 999 select,update queries for THAT user only....no drops no nothing.

 

Edit: Obviously noone is watching this thread....

I've made a poll, please vote people: http://epochmod.com/forum/index.php?/forum/16-feedback/

Link to comment
Share on other sites

  • 0

I am also wondering about the reasons behind "reinventing the wheel" as you said, its just to much unnecessary code in my opinion.

some coders still think more code is always better but I don't know, not the the  creator of the HiveExt is getting paid on hourly basis, or is he? hahah :D

 

and if you want it should be fairly easy to get the old 999 and 998 calls maca implemented back in the hive, but I don't have the c++ build system setup atm and that is a lot of work to compile this tiny DLL.. :/

Link to comment
Share on other sites

  • 0

I am also wondering about the reasons behind "reinventing the wheel" as you said, its just to much unnecessary code in my opinion.

some coders still think more code is always better but I don't know, not the the  creator of the HiveExt is getting paid on hourly basis, or is he? hahah :D

 

and if you want it should be fairly easy to get the old 999 and 998 calls maca implemented back in the hive, but I don't have the c++ build system setup atm and that is a lot of work to compile this tiny DLL.. :/

 

Thanks Axe,

I couldnt find maca's post about that...I remember seeing it but couldnt find it...Probably i'll start doing the process at some point. I really need the custom SQL and i dont see a way around this.

I wish more opendayz people would populate our forums...seems as if only a handful of people are writing scripts here, otherwise someone, somewhere would have done it already :)

Link to comment
Share on other sites

  • 0

You can see maca's changes in this pull request, or just look at maca's repository he still has the old Hive with his additions on GitHub.

 

Thanks :) bookmarked!

See how simple it is ? Bam...1 dll for mortals, 1 dll for gods, ahahahah.jk.

uh crap...well its official...they are not gonna release a custom dll.....Time to remember my C++ from uni.

Link to comment
Share on other sites

  • 0

I need to delete  over 1000 vehicles on my server, somehow they keep spawning. I need  a sql command to display all Object_DATA  character id 0 and inventory empty so I can check all and delete

I seen this sql command somewhere but didnt need at the time. now that I do I cant find it 

Link to comment
Share on other sites

  • 0

I need to delete  over 1000 vehicles on my server, somehow they keep spawning. I need  a sql command to display all Object_DATA  character id 0 and inventory empty so I can check all and delete

I seen this sql command somewhere but didnt need at the time. now that I do I cant find it 

 

For the n'th time:

 

Link to comment
Share on other sites

  • 0

i woudl still prefer an ingame script for admins instead of "complicated" SQL query, whats does everone want to do this in the DB directly? :D

much easier with a simple script because the game engine already knows if a vehicle has a owner or not and other stuff..

Link to comment
Share on other sites

  • 0

i woudl still prefer an ingame script for admins instead of "complicated" SQL query, whats does everone want to do this in the DB directly? :D

much easier with a simple script because the game engine already knows if a vehicle has a owner or not and other stuff..

 

The less 'hack' menus ingame the better i think. Dont want any script kiddie, besides having access to admin panels to delete vehicles as well with a click of a button :P

Link to comment
Share on other sites

  • 0

The less 'hack' menus ingame the better i think. Dont want any script kiddie, besides having access to admin panels to delete vehicles as well with a click of a button :P

Well if a hacker gets access as an in game admin you are fucked anyway, also if a hacker just gets access to run scripts he can just do that without your admin tools..

but then you are right, luckily most hackers have no clue about Arma scripting and that is the only protection you have.,. a skilled hacker can do what he wants in this game sadly lol

Link to comment
Share on other sites

  • 0

Cant someone please make a 998, 999 version of the hiveext.dll for 1042 ?

 

Or at least (to the developers) allow us to have some custom tables in the HiveExt.ini, besides the freaking object_data and players_data....

I dont understand why devs have this stubborn view on 999 queries. Every other dayz mod has them, whats so special about epoch that with 999 all hell will break lose. Is it that unstable or hackable...wtf ?

And besides isnt it up the server admin to mess it up ?

 

At least release 2 hiveext.dlls.....one with 999 and one without....People have been begging for this for months now.

You dont see a lot of people requesting it...cause lets face it....80% of the people here are not writing scripts.

 

I also +1'ed you poll and when I last saw it was 85-15 for yes. I just can't see why malicious SQL statements couldn't be blocked via user rights management.

Could hiveext.dll be able to execute custom stored functions? If one has its tables and stored functions on his server, they can be safely set or get any data from anywhere.

Link to comment
Share on other sites

  • 0

I also +1'ed you poll and when I last saw it was 85-15 for yes. I just can't see why malicious SQL statements couldn't be blocked via user rights management.

Could hiveext.dll be able to execute custom stored functions? If one has its tables and stored functions on his server, they can be safely set or get any data from anywhere.

 

Hi

 

2 of our hiveext.dll's for the single currency mod has 999/998 support. You can use those dll's if needed.

Link to comment
Share on other sites

  • 0

Hi

 

2 of our hiveext.dll's for the single currency mod has 999/998 support. You can use those dll's if needed.

 

Hi, thanks for the tip! Do these DLLs work standalone with 1.0.5.1-based clients/servers? It seems that I will have to launch queries from the client code to the server.

Link to comment
Share on other sites

  • 0

just replace the dll file in @server_epoch.

 

The 999 orinal hive doesnt support all 1.0.5.1 features, like maintaining.

 

But i think u can use one of souls edited version of the 1.0.5.1 hive.

 

Those are all build on the newest one.

 

 

 

 

EDIT:

I asked Soul to make the newest one with Only 999/998support on it.

Cus those all use single currency, so custom 201 call. ( Char sync).

Except for the full 999 hive, (but thats build on an older release)
Link to comment
Share on other sites

  • 0

EDIT:

I asked Soul to make the newest one with Only 999/998support on it.

Cus those all use single currency, so custom 201 call. ( Char sync).

Except for the full 999 hive, (but thats build on an older release)

 

That is some decent news :)

 

Two things though.

  1. Could you ask him to base it on https://github.com/vos/DayZhiveEpoch which is the latest hive + multichar support?
  2. Could you ask him to publicly release the hive source on github or e.g.?

Without the latter I don't feel like using it, and neither do i think others should. (Tried to explain why and )

Link to comment
Share on other sites

  • 0

Once again a dummy question from my side: Is there a theoretical reason why there's no possibility to call any server-side stored procedures or functions? It's safe and no error prone.

 

I guess that the 999 can get use this, since it uses SQL syntax to execute the query?

EXEC Stored_procedure; 
Link to comment
Share on other sites

  • 0

Once again a dummy question from my side: Is there a theoretical reason why there's no possibility to call any server-side stored procedures or functions? It's safe and no error prone.

 

 

 

I guess that the 999 can get use this, since it uses SQL syntax to execute the query?

EXEC Stored_procedure; 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...