public IEnumerableGetStatements(string query) { string[] parts = query.Split(new string[] { ";\r\n" }, StringSplitOptions.RemoveEmptyEntries); return from p in parts select p.Trim(new char[] { ' ', ';', '\t' }); }
I didn't split on white lines because those can also occur within statements; and it's to risky when UPDATE's and WHERE's are involved.
No comments:
Post a Comment