Beispiel #1
0
        static public superq Create(dynamic obj, string name, string host, string keyCol = "")
        {
            superq sq = new superq(obj, name, "", keyCol, false);

            SuperQNetworkClientMgr.superq_create(sq);

            return(sq);
        }
Beispiel #2
0
 public superqelem(dynamic name,
                   dynamic value,
                   superq parentSq,
                   bool buildFromStr)
 {
     this.name     = name;
     this.value    = value;
     this.parentSq = parentSq;
 }
        public static void superqelem_delete(superq sq, string name)
        {
            // build request object
            SuperQNodeRequest request = new SuperQNodeRequest();

            request.cmd  = "superqelem_delete";
            request.args = sq.publicName;
            request.body = name;

            SuperQNetworkClientMgr mgr = new SuperQNetworkClientMgr();

            mgr.send_msg(sq.host, request.ToString());
        }
        public static void superqelem_create(superq sq, superqelem sqe, int idx = -1)
        {
            // build request object
            SuperQNodeRequest request = new SuperQNodeRequest();

            request.cmd  = "superqelem_create";
            request.args = sq.publicName + "," + idx.ToString();
            request.body = sqe.ToString();

            SuperQNetworkClientMgr mgr = new SuperQNetworkClientMgr();

            mgr.send_msg(sq.host, request.ToString());
        }
        public static void superq_create(superq sq)
        {
            // build request object from string
            SuperQNodeRequest request = new SuperQNodeRequest();

            request.cmd  = "superq_create";
            request.args = sq.publicName;
            request.body = sq.ToString();

            SuperQNetworkClientMgr mgr = new SuperQNetworkClientMgr();

            mgr.send_msg(sq.host, request.ToString());
        }
        public static superq superq_query(superq sq, string query)
        {
            // build request object from string
            SuperQNodeRequest request = new SuperQNodeRequest();

            request.cmd  = "superq_query";
            request.args = sq.publicName;
            request.body = query;

            SuperQNetworkClientMgr mgr      = new SuperQNetworkClientMgr();
            SuperQNodeResponse     response = mgr.send_msg(sq.host, request.ToString());

            if (bool.Parse(response.result) == false)
            {
                throw new Exception("Not sure what to raise here yet.");
            }

            return(new superq(response.body, "", "", "", false, true));
        }