NWNX:EE  8193.37.14
nwnx_redis_lib.nss
Go to the documentation of this file.
1 
10 
13 
16 
20 
25 
28 
30 const int NWNX_REDIS_RESULT_NULL = 6;
32 
34 int NWNX_Redis_GetResultType(int resultId);
35 
39 int NWNX_Redis_GetArrayLength(int resultId);
40 
46 int NWNX_Redis_GetArrayElement(int resultId, int idx);
47 
51 float NWNX_Redis_GetResultAsFloat(int resultId);
52 
56 int NWNX_Redis_GetResultAsInt(int resultId);
57 
61 string NWNX_Redis_GetResultAsString(int resultId);
62 
64 
65 int NWNX_Redis_GetResultType(int resultId)
66 {
67  NWNXPushInt(resultId);
68  NWNXCall("NWNX_Redis", "GetResultType");
69  return NWNXPopInt();
70 }
71 
72 int NWNX_Redis_GetArrayLength(int resultId)
73 {
74  NWNXPushInt(resultId);
75  NWNXCall("NWNX_Redis", "GetResultArrayLength");
76  return NWNXPopInt();
77 }
78 
79 // Returns the last
80 int NWNX_Redis_GetArrayElement(int resultId, int idx)
81 {
82  NWNXPushInt(resultId);
83  NWNXPushInt(idx);
84  NWNXCall("NWNX_Redis", "GetResultArrayElement");
85  return NWNXPopInt();
86 }
87 
88 float NWNX_Redis_GetResultAsFloat(int resultId)
89 {
90  NWNXPushInt(resultId);
91  NWNXCall("NWNX_Redis", "GetResultAsString");
92  return StringToFloat(NWNXPopString());
93 }
94 
95 int NWNX_Redis_GetResultAsInt(int resultId)
96 {
97  NWNXPushInt(resultId);
98  NWNXCall("NWNX_Redis", "GetResultAsString");
99  return StringToInt(NWNXPopString());
100 }
101 
102 string NWNX_Redis_GetResultAsString(int resultId)
103 {
104  NWNXPushInt(resultId);
105  NWNXCall("NWNX_Redis", "GetResultAsString");
106  return NWNXPopString();
107 }
const int NWNX_REDIS_RESULT_NULL
Null result.
int NWNX_Redis_GetResultAsInt(int resultId)
Gets the given result as an integer.
const int NWNX_REDIS_RESULT_INTEGER
Integer result.
float NWNX_Redis_GetResultAsFloat(int resultId)
Gets the given result as a float.
string NWNX_Redis_GetResultAsString(int resultId)
Gets the given result as a string.
int NWNX_Redis_GetResultType(int resultId)
Returns the result type as a int.
const int NWNX_REDIS_RESULT_ERROR
Error result.
const int NWNX_REDIS_RESULT_ARRAY
Array result.
int NWNX_Redis_GetArrayLength(int resultId)
Gets the length of the given result.
int NWNX_Redis_GetArrayElement(int resultId, int idx)
Gets a list entry as a string.
const int NWNX_REDIS_RESULT_STRING
String result.