예제 #1
0
 public static int[] GetOrderByAttributeIds(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
                                            classInfo, NeoDatis.Odb.Core.Query.IQuery query)
 {
     string[] fieldNames = query.GetOrderByFieldNames();
     int[]    fieldIds   = new int[fieldNames.Length];
     for (int i = 0; i < fieldNames.Length; i++)
     {
         fieldIds[i] = classInfo.GetAttributeId(fieldNames[i]);
     }
     return(fieldIds);
 }
예제 #2
0
        /// <summary>Transform a list of field names into a list of field ids</summary>
        /// <param name="fields"></param>
        /// <returns>The array of field ids</returns>
        protected virtual int[] GetAllInvolvedFieldIds(NeoDatis.Tool.Wrappers.List.IOdbList
                                                       <string> fields)
        {
            int nbFields = fields.Count;

            int[] fieldIds = new int[nbFields];
            for (int i = 0; i < nbFields; i++)
            {
                fieldIds[i] = classInfo.GetAttributeId(fields[i].ToString());
            }
            return(fieldIds);
        }