Ejemplo n.º 1
0
 internal OracleProgramMetadata(ProgramType type, OracleProgramIdentifier identifier, bool isAnalytic, bool isAggregate, bool isPipelined, bool isOffloadable, bool parallelSupport, bool isDeterministic, int?metadataMinimumArguments, int?metadataMaximumArguments, AuthId authId, string displayType, bool isBuiltIn)
 {
     Type                      = type;
     Identifier                = identifier;
     IsAnalytic                = isAnalytic;
     IsAggregate               = isAggregate;
     IsPipelined               = isPipelined;
     IsOffloadable             = isOffloadable;
     ParallelSupport           = parallelSupport;
     IsDeterministic           = isDeterministic;
     _metadataMinimumArguments = metadataMinimumArguments;
     _metadataMaximumArguments = metadataMaximumArguments;
     AuthId                    = authId;
     DisplayType               = displayType;
     IsBuiltIn                 = isBuiltIn;
 }
Ejemplo 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);
        }
Ejemplo n.º 3
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);
        }
Ejemplo n.º 4
0
		private static void ShowSqlFunctionDocumentation(OracleProgramIdentifier identifier)
		{
			var isBuiltInSqlFunction = String.IsNullOrEmpty(identifier.Package) || String.Equals(identifier.Package, OracleObjectIdentifier.PackageBuiltInFunction);
			if (isBuiltInSqlFunction)
			{
				foreach (var documentation in _sqlFunctionDocumentation[identifier.Name])
				{
					Process.Start(documentation.Url);
				}
			}

			DocumentationPackageSubProgram programDocumentation;
			var packageProgramDocumentationExists = _packageProgramDocumentations.TryGetValue(identifier, out programDocumentation);
			if (packageProgramDocumentationExists)
			{
				Process.Start($"{programDocumentation.PackageDocumentation.Url}{programDocumentation.ElementId}");
			}
		}
Ejemplo n.º 5
0
 public bool Equals(OracleProgramIdentifier other)
 {
     return(String.Equals(Owner, other.Owner) && String.Equals(Name, other.Name) && String.Equals(Package, other.Package));
 }
Ejemplo n.º 6
0
			private static OracleProgramMetadata BuildProgramMetadata(ProgramType programType, OracleProgramIdentifier programIdentifier, bool isBuiltIn)
			{
				return new OracleProgramMetadata(programType, programIdentifier, false, false, false, false, false, false, null, null, AuthId.CurrentUser, OracleProgramMetadata.DisplayTypeNormal, isBuiltIn);
			}
Ejemplo n.º 7
0
		public bool Equals(OracleProgramIdentifier other)
		{
			return String.Equals(Owner, other.Owner) && String.Equals(Name, other.Name) && String.Equals(Package, other.Package);
		}