DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Package Functions | Properties | List of all members
Deveel.Data.Routines.ProcedureInfo Class Reference
Inheritance diagram for Deveel.Data.Routines.ProcedureInfo:
Deveel.Data.Routines.RoutineInfo Deveel.Data.Sql.IObjectInfo

Public Member Functions

 ProcedureInfo (ObjectName routineName)
 
 ProcedureInfo (ObjectName routineName, ProcedureType procedureType)
 
 ProcedureInfo (ObjectName routineName, RoutineParameter[] parameters)
 
 ProcedureInfo (ObjectName routineName, ProcedureType procedureType, RoutineParameter[] parameters)
 
- Public Member Functions inherited from Deveel.Data.Routines.RoutineInfo
override string ToString ()
 

Package Functions

override bool MatchesInvoke (Invoke invoke, IQuery query)
 

Properties

override RoutineType RoutineType [get]
 
ProcedureType ProcedureType [get, private set]
 
- Properties inherited from Deveel.Data.Routines.RoutineInfo
DbObjectType IObjectInfo. ObjectType [get]
 
ObjectName IObjectInfo. FullName [get]
 
ObjectName RoutineName [get, private set]
 Gets the name of the routine that uniquely identifies it in a system context. More...
 
abstract RoutineType RoutineType [get]
 
RoutineParameter[] Parameters [get, private set]
 Gets an array of parameters for the routine. More...
 
string ExternalMethodName [get, set]
 
Type ExternalType [get, set]
 
- Properties inherited from Deveel.Data.Sql.IObjectInfo
DbObjectType ObjectType [get]
 
ObjectName FullName [get]
 

Additional Inherited Members

- Protected Member Functions inherited from Deveel.Data.Routines.RoutineInfo
 RoutineInfo (ObjectName routineName)
 Constructs a routine info with the given name. More...
 
 RoutineInfo (ObjectName routineName, RoutineParameter[] parameters)
 Constructs the routine info with the given signature. More...
 

Detailed Description

Definition at line 25 of file ProcedureInfo.cs.

Constructor & Destructor Documentation

Deveel.Data.Routines.ProcedureInfo.ProcedureInfo ( ObjectName  routineName)
inline

Definition at line 26 of file ProcedureInfo.cs.

27  : this(routineName, ProcedureType.Static) {
28  }
Deveel.Data.Routines.ProcedureInfo.ProcedureInfo ( ObjectName  routineName,
ProcedureType  procedureType 
)
inline

Definition at line 30 of file ProcedureInfo.cs.

31  : this(routineName, procedureType, new RoutineParameter[0]) {
32  }
Deveel.Data.Routines.ProcedureInfo.ProcedureInfo ( ObjectName  routineName,
RoutineParameter[]  parameters 
)
inline

Definition at line 34 of file ProcedureInfo.cs.

35  : this(routineName, ProcedureType.Static, parameters) {
36  }
Deveel.Data.Routines.ProcedureInfo.ProcedureInfo ( ObjectName  routineName,
ProcedureType  procedureType,
RoutineParameter[]  parameters 
)
inline

Definition at line 38 of file ProcedureInfo.cs.

39  : base(routineName, parameters) {
40  ProcedureType = procedureType;
41  }

Member Function Documentation

override bool Deveel.Data.Routines.ProcedureInfo.MatchesInvoke ( Invoke  invoke,
IQuery  query 
)
inlinepackagevirtual

Implements Deveel.Data.Routines.RoutineInfo.

Definition at line 49 of file ProcedureInfo.cs.

49  {
50  if (invoke == null)
51  return false;
52 
53  bool ignoreCase = true;
54  if (query != null)
55  ignoreCase = query.IgnoreIdentifiersCase();
56 
57  if (!RoutineName.Equals(invoke.RoutineName, ignoreCase))
58  return false;
59 
60 
61  var inputParams = Parameters.Where(parameter => parameter.IsInput).ToList();
62  if (invoke.Arguments.Length != inputParams.Count)
63  return false;
64 
65  for (int i = 0; i < invoke.Arguments.Length; i++) {
66  // TODO: support variable evaluation here? or evaluate parameters before reaching here?
67  if (!invoke.Arguments[i].IsConstant())
68  return false;
69 
70  var argType = invoke.Arguments[i].ReturnType(query, null);
71  var paramType = Parameters[i].Type;
72 
73  // TODO: verify if this is assignable (castable) ...
74  if (!paramType.IsComparable(argType))
75  return false;
76  }
77 
78  return true;
79  }
RoutineParameter[] Parameters
Gets an array of parameters for the routine.
Definition: RoutineInfo.cs:72
override bool Equals(object obj)
Definition: ObjectName.cs:241
ObjectName RoutineName
Gets the name of the routine that uniquely identifies it in a system context.
Definition: RoutineInfo.cs:65

Property Documentation

ProcedureType Deveel.Data.Routines.ProcedureInfo.ProcedureType
getprivate set

Definition at line 47 of file ProcedureInfo.cs.

override RoutineType Deveel.Data.Routines.ProcedureInfo.RoutineType
get

Definition at line 43 of file ProcedureInfo.cs.


The documentation for this class was generated from the following file: