Exemplo n.º 1
0
 public void DeleteMessages(int characterID, int mailboxID, PyList <PyInteger> messageIDs)
 {
     Database.PrepareQuery(
         $"DELETE FROM eveMail WHERE messageID IN ({PyString.Join(',', messageIDs)} AND channelID = @mailboxID",
         new Dictionary <string, object>()
     {
         { "@mailboxID", mailboxID }
     }
         );
 }
Exemplo n.º 2
0
        public void DeleteBookmark(PyList <PyInteger> bookmarkIDs, int ownerID)
        {
            // do not remove anything if the count is not greater than 0
            if (bookmarkIDs.Count == 0)
            {
                return;
            }

            Database.PrepareQuery(
                $"DELETE FROM chrBookmarks WHERE ownerID = @characterID AND bookmarkID IN({PyString.Join(',', bookmarkIDs)})",
                new Dictionary <string, object>()
            {
                { "@characterID", ownerID }
            }
                );
        }
Exemplo n.º 3
0
 public void MarkMessagesRead(int characterID, PyList <PyInteger> messageIDs)
 {
     Database.Query(
         $"UPDATE eveMail SET `read` = 1 WHERE messageID IN ({PyString.Join(',', messageIDs)})"
         );
 }
Exemplo n.º 4
0
        public PyDataType GetMultiAllianceShortNamesEx(PyList <PyInteger> ids)
        {
            MySqlConnection connection = null;
            MySqlDataReader reader     = Database.PrepareQuery(ref connection,
                                                               $"SELECT allianceID, shortName FROM alliance_shortnames WHERE allianceID IN ({PyString.Join(',', ids)}"
                                                               ).ExecuteReader();

            using (connection)
                using (reader)
                {
                    return(TupleSet.FromMySqlDataReader(Database, reader));
                }
        }
Exemplo n.º 5
0
        public PyDataType GetMultiLocationsEx(PyList <PyInteger> ids)
        {
            MySqlConnection connection = null;
            MySqlDataReader reader     = Database.PrepareQuery(ref connection,
                                                               $"SELECT itemID as locationID, itemName as locationName, x, y, z FROM invItems LEFT JOIN eveNames USING(itemID) LEFT JOIN invPositions USING (itemID) WHERE itemID IN ({PyString.Join(',', ids)})"
                                                               ).ExecuteReader();

            using (connection)
                using (reader)
                {
                    return(TupleSet.FromMySqlDataReader(Database, reader));
                }
        }
Exemplo n.º 6
0
        public PyDataType GetMultiGraphicsEx(PyList <PyInteger> ids)
        {
            MySqlConnection connection = null;
            MySqlDataReader reader     = Database.PrepareQuery(ref connection,
                                                               $"SELECT graphicID, url3D, urlWeb, icon, urlSound, explosionID FROM eveGraphics WHERE graphicID IN ({PyString.Join(',', ids)})"
                                                               ).ExecuteReader();

            using (connection)
                using (reader)
                {
                    return(TupleSet.FromMySqlDataReader(Database, reader));
                }
        }
Exemplo n.º 7
0
        public PyDataType GetMultiOwnersEx(PyList <PyInteger> ids)
        {
            MySqlConnection connection = null;
            MySqlDataReader reader     = Database.PrepareQuery(ref connection,
                                                               $"SELECT itemID as ownerID, itemName as ownerName, typeID FROM eveNames WHERE itemID IN ({PyString.Join(',', ids)})"
                                                               ).ExecuteReader();

            using (connection)
                using (reader)
                {
                    return(TupleSet.FromMySqlDataReader(Database, reader));
                }
        }
Exemplo n.º 8
0
        public PyDataType GetMultiInvTypesEx(PyList <PyInteger> ids)
        {
            MySqlConnection connection = null;
            MySqlDataReader reader     = Database.PrepareQuery(ref connection,
                                                               $"SELECT typeID, groupID, typeName, description, graphicID, radius, mass, volume, capacity, portionSize, raceID, basePrice, published, marketGroupID, chanceOfDuplicating, dataID FROM invTypes WHERE typeID IN ({PyString.Join(',', ids)})"
                                                               ).ExecuteReader();

            using (connection)
                using (reader)
                {
                    return(RowList.FromMySqlDataReader(Database, reader));
                }
        }