Inheritance: NamedParameterObjectModel
Example #1
0
        public MongoDataInput(DataInputModel model)
        {
            _connectionString = model.Connection;

            var temp = model.ObjectName.Split('.');

            _databaseName = temp[0];

            _collectionName = temp[1];

            _filter = model.Filter;
        }
Example #2
0
        public MongoDataInput(DataInputModel model)
        {
            _connectionString = model.Connection;

            var temp = model.ObjectName.Split('.');

            _databaseName = temp[0];

            _collectionName = temp[1];

            _filter = model.Filter;
        }
        private ITransformDataReader CreateSqlDataReader(DataInputModel source)
        {
            var temp = source.Connection.Split('.');

            var logicDbName = temp[0];

            var queryName = temp[1];

            var connection = new SqlConnection(_connectionStringProvider.GetConnectionString(logicDbName));

            var sql = SqlNamedQueryProvider.Instance.Get(queryName);

            IDictionary <string, object> parameters = Newtonsoft.Json.JsonConvert.DeserializeObject <IDictionary <string, object> >(source.Filter);

            var reader = new SqlTransformDataReader(connection, sql, parameters);

            reader.SetPrimaryKey(source.PrimaryKey);

            return(reader);
        }
        private ITransformDataReader CreateSqlDataReader(DataInputModel source)
        {
            var temp = source.Connection.Split('.');

            var logicDbName = temp[0];

            var queryName = temp[1];

            var connection = new SqlConnection(_connectionStringProvider.GetConnectionString(logicDbName));

            var sql = SqlNamedQueryProvider.Instance.Get(queryName);

            IDictionary<string, object> parameters = Newtonsoft.Json.JsonConvert.DeserializeObject<IDictionary<string, object>>(source.Filter);

            var reader = new SqlTransformDataReader(connection, sql, parameters);

            reader.SetPrimaryKey(source.PrimaryKey);

            return reader;
        }
 private static ITransformDataReader CreateJsonFileDataReader(DataInputModel source)
 {
     return(new JsonFileDataReader(source.Connection, source.PrimaryKey));
 }
        private ITransformDataReader CreateMongoDataReader(DataInputModel source)
        {
            var collection = GetCollection(source.Connection);

            return(new MongoDataReader(collection, source.Filter));
        }
        private ITransformDataReader CreateMongoDataReader(DataInputModel source)
        {
            var collection = GetCollection(source.Connection);

            return new MongoDataReader(collection, source.Filter);
        }
 private static ITransformDataReader CreateJsonFileDataReader(DataInputModel source)
 {
     return new JsonFileDataReader(source.Connection, source.PrimaryKey);
 }
 public IDataInput CreateDataInput(DataInputModel model)
 {
     return LemonTransform.Container.Resolve<IDataInput>(
         model.SourceType + "_input", 
         new { model = model });
 }
Example #10
0
 public IDataInput CreateDataInput(DataInputModel model)
 {
     return(LemonTransform.Container.Resolve <IDataInput>(
                model.SourceType + "_input",
                new { model = model }));
 }