66 |
count++; |
count++; |
67 |
} |
} |
68 |
|
|
69 |
|
void LSCPResultSet::Add(String Label, const char* pValue) { |
70 |
|
Add(Label, String(pValue)); |
71 |
|
} |
72 |
|
|
73 |
|
//Add SQL resultset row |
74 |
|
void LSCPResultSet::Add(int columns, char** argv) { |
75 |
|
for (int i = 0; i < columns; i++) |
76 |
|
{ |
77 |
|
storage += argv[i]; |
78 |
|
if ((i+1) < columns) |
79 |
|
storage += "|"; |
80 |
|
} |
81 |
|
storage += "\r\n"; |
82 |
|
count = 2; //This result is always multiline. |
83 |
|
} |
84 |
|
|
85 |
void LSCPResultSet::Add(int Value) { |
void LSCPResultSet::Add(int Value) { |
86 |
Add(ToString(Value)); |
Add(ToString(Value)); |
87 |
} |
} |
91 |
} |
} |
92 |
|
|
93 |
void LSCPResultSet::Add(String Label, float Value) { |
void LSCPResultSet::Add(String Label, float Value) { |
94 |
std::stringstream ss; //fixme: had issues with template and float?! |
char s[1024]; |
95 |
ss << Value; |
snprintf(s, 1023, "%.3f", Value); |
96 |
Add(Label, ss.str()); |
Add(Label, String(s)); |
97 |
} |
} |
98 |
|
|
99 |
void LSCPResultSet::Add(String Label, bool Value) { |
void LSCPResultSet::Add(String Label, bool Value) { |