/// <summary> /// Adds the specified map. /// </summary> /// <param name="procedureName">Name of the procedure.</param> /// <param name="dbName">Name of the db.</param> /// <param name="type">The type.</param> /// <param name="body">The body.</param> /// <param name="supportedRdbms">The supported RDBMS.</param> /// <returns></returns> public StatementMap Add(string procedureName, string dbName, MappedStatementType type, string body, string supportedRdbms) { var proc = new StatementMap(procedureName, dbName, type) { Body = body, CanRunOn = supportedRdbms }; Add(proc); return(proc); }
/// <summary> /// Adds the specified map. /// </summary> /// <param name="map">The map.</param> /// <param name="dbName">Name of the db.</param> /// <param name="type">The type.</param> /// <param name="body">The body.</param> /// <param name="supportedRdbms">The supported RDBMS.</param> /// <returns></returns> public StatementMap Add(EntityMap map, string dbName, MappedStatementType type, string body, string supportedRdbms) { string procName = BuildMappedStatementName(map, type); var proc = new StatementMap(procName, dbName, type) { Body = body, CanRunOn = supportedRdbms, DependsOnEntity = map.FullName }; Add(proc); return(proc); }
/// <summary> /// Initializes a new instance of the <see cref="StatementMap"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="dbName">Name of the db.</param> /// <param name="operationType">Type of the operation.</param> public StatementMap(string name, string dbName, MappedStatementType operationType) { Name = name; DbName = dbName; OperationType = operationType; }
/// <summary> /// Adds the specified map. /// </summary> /// <param name="map">The map.</param> /// <param name="type">The type.</param> /// <param name="body">The body.</param> public StatementMap Add(EntityMap map, MappedStatementType type, string body) { string procName = BuildMappedStatementName(map, type); return(Add(procName, procName, type, body, Platform.Id)); }
/// <summary> /// Builds the name of the procedure. /// </summary> /// <param name="type">The type.</param> /// <param name="procType">Type of the proc.</param> /// <returns></returns> public static string BuildMappedStatementName(Type type, MappedStatementType procType) { return(string.Format("{0}_{1}", type.FullName, procType)); }
/// <summary> /// Builds the name of the procedure. /// </summary> /// <param name="map">The map.</param> /// <param name="type">The type.</param> /// <returns></returns> public static string BuildMappedStatementName(EntityMap map, MappedStatementType type) { return(string.Format("{0}_{1}", map.FullName, type)); }
/// <summary> /// Tries the get value. /// </summary> /// <param name="map">The map.</param> /// <param name="procType">Type of the proc.</param> /// <param name="val">The val.</param> /// <returns></returns> public bool TryGetValue(EntityMap map, MappedStatementType procType, out StatementMap val) { var procName = BuildMappedStatementName(map, procType); return(TryGetValue(procName, out val)); }
/// <summary> /// Tries the get value. /// </summary> /// <param name="type">The type.</param> /// <param name="procType">Type of the proc.</param> /// <param name="val">The val.</param> /// <returns></returns> public bool TryGetValue(Type type, MappedStatementType procType, out StatementMap val) { var procName = BuildMappedStatementName(type, procType); return(TryGetValue(procName, out val)); }
/// <summary> /// Adds the specified map. /// </summary> /// <param name="map">The map.</param> /// <param name="dbName">Name of the db.</param> /// <param name="type">The type.</param> /// <param name="body">The body.</param> public StatementMap Add(EntityMap map, string dbName, MappedStatementType type, string body) { return(Add(map, dbName, type, body, Platform.Id)); }