30 #include "packets/General.h"
71 return new PyBuffer( data, data + len );
75 sLog.Error(
"DBColumnToPyRep",
"invalid column type: %u", row.
ColumnType(index) );
89 return new PyObject(
"util.Rowset" , args );
93 for(
uint32 r(0); r < cc; ++r)
105 while(result.
GetRow(row)) {
107 for (r = 0; r < cc; ++r)
113 return new PyObject(
"util.Rowset" , args );
125 for(
uint32 r(0); r < cc; ++r)
127 res->
items[0] = cols;
133 while(result.
GetRow(row)) {
135 for(r = 0; r < cc; ++r)
137 reslist->
items.push_back(linedata);
139 res->
items[1] = reslist;
148 for(key_index = 0; key_index < cc; ++key_index)
149 if(strcmp(key, result.
ColumnName(key_index)) == 0)
154 sLog.Error(
"EVEDBUtils",
"DBResultToIndexRowset | Failed to find key column '%s' in result for IndexRowset", key);
167 if(cc == 0 || cc < key_index)
168 return new PyObject(
"util.IndexRowset", args );
173 for(
uint32 i(0); i < cc; ++i)
186 while(result.
GetRow(row)) {
189 for(i = 0; i < cc; ++i)
196 return new PyObject(
"util.IndexRowset", args );
202 for(
uint32 r(0); r < cc; ++r )
205 return new PyObject(
"util.KeyVal", args );
215 for(
uint32 r(0); r < cc; ++r)
223 for(
uint32 r(0); r < cc; ++r)
238 for(
uint32 r(0); r < cc; ++r)
247 while(result.
GetRow(row)) {
250 reslist->
items.push_back(o);
261 while (result.
GetRow(row)) {
277 while(result.
GetRow(row)) {
295 for(
uint32 i(0); i < cc; ++i )
313 while( result.
GetRow(row) ) {
329 while( result.
GetRow(row) ) {
345 for (key_index = 0; key_index < cc; ++key_index)
346 if (strcmp(key, result.
ColumnName(key_index)) == 0)
351 sLog.Error(
"EVEDBUtils",
"DBResultToPackedRowDict | Failed to find key column '%s' in result for CIndexRowset", key);
365 while( result.
GetRow(row) ) {
409 while( result.
GetRow( row ) )
424 for(key_index = 0; key_index < cc; key_index++)
425 if(strcmp(key, result.
ColumnName(key_index)) == 0)
430 sLog.Error(
"EVEDBUtils",
"DBResultToCIndexedRowset | Failed to find key column '%s' in result for CIndexRowset", key);
443 while( result.
GetRow( row ) )
466 while(result.
GetRow(row)) {
482 while(result.
GetRow(row)) {
500 uint32 last_key = 0xFFFFFFFF;
505 while( result.
GetRow( row ) )
511 std::map<int32, PyRep *>::iterator res = into.find(k);
512 if (res != into.end() )
516 into[k] = l =
new PyList();
uint32 ColumnLength(uint32 index) const
const char * GetText(uint32 index) const
PyTuple * DBResultToPackedRowListTuple(DBQueryResult &result)
PyObjectEx * DBResultToCRowset(DBQueryResult &result)
int32 GetInt(uint32 index) const
uint32 GetUInt(uint32 index) const
double GetDouble(uint32 index) const
void SetItemString(size_t index, const char *str)
Stores Python string.
Python floating point number.
PyObjectEx * DBResultToCIndexedRowset(DBQueryResult &result, const char *key)
PyDict * DBResultToIntIntDict(DBQueryResult &result)
bool GetRow(DBResultRow &into)
bool GetBool(uint32 index) const
PyObject * DBRowToRow(DBResultRow &row, const char *type)
#define sLog
Evaluates to a NewLog instance.
void DBResultToIntIntlistDict(DBQueryResult &result, std::map< int32, PyRep * > &into)
PyDict * DBResultToIntRowDict(DBQueryResult &result, uint32 key_index, const char *type)
Python object "blue.DBRowDescriptor".
uint32 ColumnCount() const
void SetItem(size_t index, PyRep *object)
Stores Python object.
Python object "dbutil.CRowset".
PyPackedRow * NewRow(PyRep *key)
PyObject * DBResultToRowset(DBQueryResult &result)
void SetItem(size_t index, PyRep *object)
Stores Python object.
const char * ColumnName(uint32 index) const
PyTuple * DBResultToRowList(DBQueryResult &result, const char *type)
PyTuple * DBResultToTupleSet(DBQueryResult &result)
bool IsNull(uint32 index) const
void AddItemInt(int32 intval)
PyList * DBResultToPackedRowList(DBQueryResult &result)
const char * ColumnName(uint32 index) const
PyObject * DBResultToIndexRowset(DBQueryResult &result, const char *key)
Python token (eg. class name).
bool SetField(uint32 index, PyRep *value)
Python object "dbutil.CIndexedRowset".
PyPackedRow * DBRowToPackedRow(DBResultRow &row)
PyDict * DBResultToPackedRowDict(DBQueryResult &result, const char *key)
PyObject * DBRowToKeyVal(DBResultRow &row)
typeID Spawn an NPC with the specified type text Search for items matching the specified query() type() key(value)-Send an OnRemoteMessage" ) COMMAND( setbpattr
uint32 ColumnCount() const
void FillPackedRow(const DBResultRow &row, PyPackedRow *into)
int64 GetInt64(uint32 index) const
entityID heal the character with the entityID note giving you detailed ship status information gives a list of all dynamic entities and players and their destinyState in this bubble shows some current destiny variables save all items
void SetItem(PyRep *key, PyRep *value)
SetItem adds or sets a database entry.
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
PyRep * DBColumnToPyRep(const DBResultRow &row, uint32 index)
DBTYPE ColumnType(uint32 index) const
PyPackedRow * CreatePackedRow(const DBResultRow &row, DBRowDescriptor *header)
void DBResultToUIntUIntDict(DBQueryResult &result, std::map< uint32, uint32 > &into)