Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="lake"></param>
 public void AddSchema(DataLake lake)
 {
     foreach (DataSet ds in lake.Values)
     {
         AddSchema(ds);
     }
 }
Exemplo n.º 2
0
 private static void ReadVAL(DataLake lake, VAL val)
 {
     for (int i = 0; i < val.Size; i++)
     {
         VAL     line = val[i];
         DataSet ds   = new DataSet();
         ReadVAL(ds, line[1]);
         ds.DataSetName = line[0].ToSimpleString();
         lake.Add(ds.DataSetName, ds);
     }
 }
Exemplo n.º 3
0
        public static string WriteJson(this DataLake lake, JsonStyle style)
        {
            VAL val = new VAL();

            foreach (var kvp in lake)
            {
                DataSet ds  = kvp.Value;
                VAL     _ds = new VAL();
                foreach (DataTable dt in ds.Tables)
                {
                    var _dt = WriteVAL(dt, style);
                    _ds.AddMember(dt.TableName, _dt);
                }

                val.AddMember(kvp.Key, _ds);
            }

            return(ToJson(style, val));
        }
Exemplo n.º 4
0
        public static void ReadJson(this DataLake lake, string json)
        {
            VAL val = Script.Evaluate(json);

            ReadVAL(lake, val);
        }