DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
FunctionParameterConfigurationExtensions.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2015 Deveel
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 using System;
18 
19 using Deveel.Data.Routines;
20 using Deveel.Data.Types;
21 
22 namespace Deveel.Data.Sql.Fluid {
25  return config.Unbounded(true);
26  }
27 
29  return config.OfType(PrimitiveTypes.String(SqlTypeCode.VarChar, maxSize));
30  }
31 
33  return config.OfType(PrimitiveTypes.String(SqlTypeCode.VarChar));
34  }
35 
37  return config.OfType(PrimitiveTypes.String());
38  }
39 
41  return config.OfType(PrimitiveTypes.Numeric(size));
42  }
43 
45  return config.OfType(PrimitiveTypes.Numeric());
46  }
47 
49  return config.OfType(Function.DynamicType);
50  }
51 
52  // TODO: More types ...
53  }
54 }
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static readonly SqlType DynamicType
A special SqlType that is used to mark an argument of a function as dynamic.
Definition: Function.cs:39
static IFunctionParameterConfiguration OfStringType(this IFunctionParameterConfiguration config)
static IFunctionParameterConfiguration OfNumericType(this IFunctionParameterConfiguration config, int size)
A system routine that returns a value at the end of its execution.
Definition: Function.cs:31
IFunctionParameterConfiguration Unbounded(bool flag)
static IFunctionParameterConfiguration Unbounded(this IFunctionParameterConfiguration config)
static NumericType Numeric()
IFunctionParameterConfiguration OfType(SqlType type)
SqlTypeCode
Enumerates the codes of all SQL types handled by the system.
Definition: SqlTypeCode.cs:23
static IFunctionParameterConfiguration OfVarCharType(this IFunctionParameterConfiguration config, int maxSize)
static IFunctionParameterConfiguration OfDynamicType(this IFunctionParameterConfiguration config)
static IFunctionParameterConfiguration OfVarCharType(this IFunctionParameterConfiguration config)
static IFunctionParameterConfiguration OfNumericType(this IFunctionParameterConfiguration config)