/// <summary>Create a column on SlicingDice API</summary> /// <param name="query">The query to send to SlicingDice API</param> public Dictionary <string, dynamic> CreateColumn(dynamic query) { var url = this._baseUrl + URLResources.Column; var sdValidator = new ColumnValidator(query); if (sdValidator.Validator()) { return(this.MakeRequest(url, query, false, 1)); } return(null); }
public DumpReader(string filename, string target, SqlConnection connection, ColumnValidator validator) { using (var cmd = connection.CreateCommand()) { cmd.CommandType = CommandType.Text; cmd.CommandText = "select top 1 * from " + target; using (var reader = cmd.ExecuteReader()) { schema = reader.GetSchemaTable(); } } nameColumn = schema.Columns[0]; this.reader = new XmlTextReader(filename); this.validator = validator; }
public DumpReader(string filename, string target, SqlConnection connection, ColumnValidator validator) { using (var cmd = connection.CreateCommand()) { cmd.CommandType = CommandType.Text; cmd.CommandText = "select top 1 * from " + target; using (var reader = cmd.ExecuteReader()) { schema = reader.GetSchemaTable(); } } nameColumn = schema.Columns[0]; this.reader = new XmlTextReader(filename); this.validator = validator; }
public void Dispose() { _validator = null; }
/// <summary> /// Initialises a new instance of Validator /// </summary> internal Validator() { _rowValidator = new RowValidator(); _colValidator = new ColumnValidator(); _rowSeperator = "\r\n"; }