/// <summary> /// Initializes a new instance of the <see cref="ScalarFunctionMetadata"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="parameters">The parameters.</param> /// <param name="typeName">Name of the type.</param> /// <param name="dbType">Type of the database.</param> /// <param name="isNullable">if set to <c>true</c> [is nullable].</param> /// <param name="maxLength">The maximum length.</param> /// <param name="precision">The precision.</param> /// <param name="scale">The scale.</param> /// <param name="fullTypeName">Full name of the type.</param> protected ScalarFunctionMetadata(string name, ParameterMetadataCollection parameters, string typeName, object?dbType, bool isNullable, int?maxLength, int?precision, int?scale, string fullTypeName) : base(name) { Parameters = parameters; TypeName = typeName; DbType = dbType; IsNullable = isNullable; MaxLength = maxLength; Precision = precision; Scale = scale; FullTypeName = fullTypeName; }
/// <summary> /// Initializes a new instance of the <see cref="StoredProcedureMetadata{TObjectName, TDbType}" /> class. /// </summary> /// <param name="name">The name.</param> /// <param name="parameters">The parameters.</param> public StoredProcedureMetadata(TObjectName name, ParameterMetadataCollection <TDbType> parameters) : base(name.ToString() !, parameters?.GenericCollection !)
/// <summary> /// Initializes a new instance of the <see cref="ParameterMetadataCollection{TDbType}" /> class. /// </summary> /// <param name="name">The name of the parent object.</param> /// <param name="list">The list to wrap.</param> public ParameterMetadataCollection(string name, IList <ParameterMetadata <TDbType> > list) : base(list) { m_Name = name; GenericCollection = new ParameterMetadataCollection(this); }
/// <summary> /// Initializes a new instance of the <see cref="Tortuga.Chain.Metadata.StoredProcedureMetadata" /> class. /// </summary> /// <param name="name">The name.</param> /// <param name="parameters">The parameters.</param> /// <exception cref="ArgumentException">name</exception> /// <exception cref="ArgumentNullException">parameters</exception> protected StoredProcedureMetadata(string name, ParameterMetadataCollection parameters) : base(name) { Parameters = parameters ?? throw new ArgumentNullException(nameof(parameters), $"{nameof(parameters)} is null."); }
/// <summary>Initializes a new instance of the <see cref="Tortuga.Chain.Metadata.TableFunctionMetadata{TObjectName, TDbType}"/> class.</summary> /// <param name="name">The name.</param> /// <param name="parameters">The parameters.</param> /// <param name="columns">The columns.</param> public TableFunctionMetadata(TObjectName name, ParameterMetadataCollection <TDbType> parameters, ColumnMetadataCollection <TDbType> columns) : base(name.ToString() !, parameters?.GenericCollection !, columns?.GenericCollection !)
/// <summary> /// Initializes a new instance of the <see cref="ScalarFunctionMetadata{TObjectName, TDbType}"/> class. /// </summary> /// <param name="name">The name of the scalar function.</param> /// <param name="parameters">The parameters.</param> /// <param name="typeName">Name of the return type.</param> /// <param name="dbType">Return type.</param> /// <param name="isNullable">if set to <c>true</c> if the return type is nullable.</param> /// <param name="maxLength">The maximum length of the return value.</param> /// <param name="precision">The precision of the return value.</param> /// <param name="scale">The scale of the return value.</param> /// <param name="fullTypeName">Full name of the return type.</param> public ScalarFunctionMetadata(TObjectName name, ParameterMetadataCollection <TDbType> parameters, string typeName, TDbType?dbType, bool isNullable, int?maxLength, int?precision, int?scale, string fullTypeName) : base(name.ToString() !, parameters?.GenericCollection !, typeName, dbType, isNullable, maxLength, precision, scale, fullTypeName)
/// <summary> /// Initializes a new instance of the <see cref="TableFunctionMetadata"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="parameters">The parameters.</param> /// <param name="columns">The columns.</param> /// <exception cref="ArgumentException">name</exception> /// <exception cref="ArgumentNullException"> /// parameters /// or /// columns /// </exception> protected TableFunctionMetadata(string name, ParameterMetadataCollection parameters, ColumnMetadataCollection columns) : base(name) { Parameters = parameters ?? throw new ArgumentNullException(nameof(parameters), $"{nameof(parameters)} is null."); Columns = columns ?? throw new ArgumentNullException(nameof(columns), $"{nameof(columns)} is null."); NullableColumns = new ColumnMetadataCollection(name, columns.Where(c => c.IsNullable == true).ToList()); }