Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide latest compiled version #5

Open
blckeagls opened this issue Jan 29, 2014 · 9 comments
Open

Provide latest compiled version #5

blckeagls opened this issue Jan 29, 2014 · 9 comments

Comments

@blckeagls
Copy link

I have the compiled version from here:

http://opendayz.net/threads/possible-to-publish-to-new-table-in-database.14642/#post-79278

but it crashes my server. Can you provide link with latest compiled version?

Thanks!

@vbawol
Copy link
Owner

vbawol commented Jan 29, 2014

They are posted on our site: http://dayzepoch.com/ and the wiki http://dayzepoch.com/wiki/index.php?title=Main_Page#Current_Build:_v1.0.4

Our version is fully to date and adds the 500-505 custom sql calls as the 999,998 calls are insecure.

Follow the steps here and you should have no problems using our new dll:
http://epochmod.com/forum/index.php?/topic/6480-server-requirements-to-update-to-104/

MD5 Hash: 9958cbdc616eec2aeb7c28d737bccc5a
Latest Server files: http://goo.gl/SpmKwg

@blckeagls
Copy link
Author

Thanks!

Do you know the syntax for the 500 and 505 calls? (Also, whats the difference between 500 and 505?)

@blckeagls
Copy link
Author

Let's say I want to issue this sql command:
insert into bank (PlayerUID,Balance) values (11111,66673);

How do I use 500/505 to do so in a .sqf?

@vbawol
Copy link
Owner

vbawol commented Jan 29, 2014

More documentation will be gathered and posted on the forum or wiki http://dayzepoch.com/wiki/index.php?title=Custom_SQL_Calls

//custom data retrieval
handlers[500] = boost::bind(&HiveExtApp::changeTableAccess,this,1); //mechanism for setting up custom table permissions
handlers[501] = boost::bind(&HiveExtApp::dataRequest,this,1,false); //sync load init and wait
handlers[502] = boost::bind(&HiveExtApp::dataRequest,this,1,true); //async load init
handlers[503] = boost::bind(&HiveExtApp::dataStatus,this,1); //retrieve request status and info
handlers[504] = boost::bind(&HiveExtApp::dataFetchRow,this,1); //fetch row from completed query
handlers[505] = boost::bind(&HiveExtApp::dataClose,this,1); //destroy any trace of request

@blckeagls
Copy link
Author

I saw that earlier.. Just wanted to know the sqf syntax to do the following command:

insert into bank (PlayerUID,Balance) values (11111,66673);

@vbawol
Copy link
Owner

vbawol commented Jan 29, 2014

//CHILD:501:DbName.TableName:["ColumnName1","ColumnName2"]:["NOT",["ColumnNameX","<","Constant"]],"AND",["SomeOtherColumn","RLIKE","[0-9]"]]:[0,50]:
//CHILD:FUNC:TBLNAME:COLUMNSARR:WHEREARR:LIMITS

//If you use function number 501 the request is synchronous (and query errors are returned immediately)
//otherwise, function number 502 is asynchronous, which means the data might be in WAIT state for a while

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

//COLUMNSARR is an array of column names to fetch
//alternatively, COLUMNSARR can be a single string called COUNT to get the row count ONLY

//WHEREARR is an array, whose elements can either be:
//1. a single string, which denotes the boolean-link operator to apply
//in this case, it can be "AND", "OR", "NOT", or any number of "(" or ")"
//2. an array of 3 elements [COLUMN,OP,CONSTANT], all 3 elements should be strings
//COLUMN is the column on which comparison OP will be applied to
//you can append .length to COLUMN to use it's length instead of it's value
//OP can be "<", ">", "=", "<>", "IS NULL", "IS NOT NULL", "LIKE", "NOT LIKE", "RLIKE", "NOT RLIKE"
//CONSTANT is a literal value with which to perform the comparison
//in the LIKE/RLIKE case, it's either a LIKE formatting string, or a REGEXP formatted string

//LIMITS is either an array of two numbers, [OFFSET, COUNT]
//or a single number COUNT
//this corresponds to the SQL versions of LIMIT COUNT or LIMIT OFFSET,COUNT
//this parameter is optional, you can omit it by just not having that :[*] at the end

//The return value is either ["PASS",UNIQID] where UNIQID represents the string token that you can later use to retrieve results
//or ["ERROR",ERRORDESCR] where ERRORDESCR is a description of the error that happened

@vbawol
Copy link
Owner

vbawol commented Jan 29, 2014

This is the developers documentation going to try and clean it up a bit:
http://dayzepoch.com/wiki/index.php?title=Custom_SQL_Calls

@blckeagls
Copy link
Author

Thanks so much

@blckeagls
Copy link
Author

From reading... there is no way to insert/update into a custom table only read from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants