Example #1
0
        public bool HasResourceDenotedBy(GraphMember theMember)
        {
            MySqlCommand cmd = new MySqlCommand("SELECT EXISTS (SELECT * FROM ResourceNodes WHERE graphId = "
                                                + itsHashCode + " AND nodeHash = " + theMember.GetHashCode() + ")", itsConn);

            return(Convert.ToInt32(cmd.ExecuteScalar()) > 0);
        }
Example #2
0
        public void AddDenotation(GraphMember member, Resource theResource)
        {
            MySqlCommand cmd = new MySqlCommand("INSERT IGNORE INTO ResourceNodes (graphId, resourceHash, nodeHash) VALUES (" +
                                                itsHashCode + ", " + theResource.GetHashCode() + ", " + member.GetHashCode() + ")", itsConn);

            cmd.ExecuteNonQuery();
        }
 public override int GetHashCode()
 {
     return(itsMember.GetHashCode());
 }