Esempio n. 1
0
        protected override OracleProgramMetadata BuildConstructorMetadata()
        {
            var constructorMetadata   = new OracleProgramMetadata(ProgramType.ObjectConstructor, OracleProgramIdentifier.CreateFromValues(FullyQualifiedName.Owner, null, FullyQualifiedName.Name), false, false, false, false, false, false, null, null, AuthId.CurrentUser, OracleProgramMetadata.DisplayTypeParenthesis, false);
            var constructorParameters = Attributes.Select(
                (a, i) => new OracleProgramParameterMetadata(a.Name, i + 1, i + 1, 0, ParameterDirection.Input, GetFunctionParameterTypeName(a.DataType), GetFunctionParameterCustomTypeIdentifier(a.DataType), false));

            var returnParameter = new OracleProgramParameterMetadata(null, 0, 0, 0, ParameterDirection.ReturnValue, TypeCodeObject, FullyQualifiedName, false);

            constructorMetadata.AddParameter(returnParameter);
            constructorMetadata.AddParameters(constructorParameters);
            return(constructorMetadata);
        }
Esempio n. 2
0
        protected override OracleProgramMetadata BuildConstructorMetadata()
        {
            var elementTypeLabel = ElementDataType.IsPrimitive
                                ? ElementDataType.FullyQualifiedName.Name.Trim('"')
                                : ElementDataType.FullyQualifiedName.ToString();

            var returnParameterType = CollectionType == OracleCollectionType.Table ? OracleCollectionTypeNestedTable : OracleCollectionTypeVarryingArray;
            var constructorMetadata = new OracleProgramMetadata(ProgramType.CollectionConstructor, OracleProgramIdentifier.CreateFromValues(FullyQualifiedName.Owner, null, FullyQualifiedName.Name), false, false, false, false, false, false, 0, UpperBound ?? Int32.MaxValue, AuthId.CurrentUser, OracleProgramMetadata.DisplayTypeParenthesis, false);

            constructorMetadata.AddParameter(new OracleProgramParameterMetadata(null, 0, 0, 0, ParameterDirection.ReturnValue, returnParameterType, FullyQualifiedName, false));
            constructorMetadata.AddParameter(new OracleProgramParameterMetadata($"array of {elementTypeLabel}", 1, 1, 0, ParameterDirection.Input, String.Empty, OracleObjectIdentifier.Empty, true));
            constructorMetadata.Owner = this;

            return(constructorMetadata);
        }
Esempio n. 3
0
 public OracleProgramMetadata GetConstructorMetadata()
 {
     return(_constructorMetadata ?? (_constructorMetadata = BuildConstructorMetadata()));
 }