Esempio n. 1
0
        private static INativeSQLQueryReturn CreateScalarReturn(HbmReturnScalar returnScalarSchema)
        {
            IType type = TypeFactory.HeuristicType(returnScalarSchema.type, null);

            if (type == null)
                throw new MappingException("could not interpret type: " + returnScalarSchema.type);

            return new NativeSQLQueryScalarReturn(returnScalarSchema.column, type);
        }
		private INativeSQLQueryReturn CreateScalarReturn(HbmReturnScalar returnScalarSchema)
		{
			string typeName;
			IDictionary<string, string> parameters = null;
			TypeDef typeDef = mappings.GetTypeDef(returnScalarSchema.type);
			if (typeDef != null)
			{
				typeName = typeDef.TypeClass;
				parameters = typeDef.Parameters;
			}
			else
			{
				typeName = returnScalarSchema.type;
			}

			IType type = TypeFactory.HeuristicType(typeName, parameters);

			if (type == null)
				throw new MappingException("could not interpret type: " + returnScalarSchema.type);

			return new NativeSQLQueryScalarReturn(returnScalarSchema.column, type);
		}