/// <summary>Format a delete request.</summary> /// <param name="uri"/> /// <param name="parent"/> /// <param name="tabl"/> /// <returns>a new deleting request</returns> public static AnUpdateReq formatDelReq(string uri, AnsonMsg parent, string tabl) { AnUpdateReq bdItem = ((AnUpdateReq) new AnUpdateReq(uri, parent) .A(JProtocol.CRUD.D)) .Mtabl(tabl); return(bdItem); }
/// <exception cref="AnsonException"/> /// <exception cref="System.IO.IOException"/> //public override Anson toBlock(java.io.OutputStream stream, params // io.odysz.anson.JsonOpt[] opts) //{ // if (jprotocol.JProtocol.CRUD.C.Equals(a) && (cols == null || cols // .Length == 0)) // { // io.odysz.common.Utils.warn("WARN - UpdateReq.toJson():\nFound inserting request but cols are null, this is wrong for no insert statement can be generated.\n" // + "Suggestion: call the InsertReq.col(col-name) before serialize this to json for table: %s\n" // + "Another common error leads to this is using UpdateReq for inserting with java client." // , mtabl); // } // return base.toBlock(stream, opts); //} /// <summary>Format an update request.</summary> /// <param name="conn"/> /// <param name="parent"/> /// <param name="tabl"/> /// <param name="cmd"> /// <see cref="JProtocol.CRUD"/>.C R U D /// </param> /// <returns>a new update request</returns> public static AnUpdateReq FormatUpdateReq(string conn, AnsonMsg parent, string tabl) { AnUpdateReq bdItem = ((AnUpdateReq) new AnUpdateReq(parent, conn) .A(JProtocol.CRUD.U)) .Mtabl(tabl); return(bdItem); }
public virtual AnUpdateReq Post(AnUpdateReq pst) { if (postUpds == null) { postUpds = new List <AnUpdateReq>(); } postUpds.Add(pst); return(this); }