本文整理汇总了C#中sones.GraphDB.TypeManagement.BasicTypes.ADBBaseObject类的典型用法代码示例。如果您正苦于以下问题:C# ADBBaseObject类的具体用法?C# ADBBaseObject怎么用?C# ADBBaseObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ADBBaseObject类属于sones.GraphDB.TypeManagement.BasicTypes命名空间,在下文中一共展示了ADBBaseObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParameterValue
/// <summary>
/// A single parameter
/// </summary>
/// <param name="myParameterName">The name of the parameter. Currently this is not used.</param>
/// <param name="myParameterDBType">The DBType of the parameter</param>
/// <param name="myVariableNumOfParams">True if this parameter occurs 1 or more time. This have to be the last parameter!</param>
public ParameterValue(String myParameterName, ADBBaseObject myParameterDBType, Boolean myVariableNumOfParams)
: this()
{
Name = myParameterName;
DBType = myParameterDBType;
VariableNumOfParams = myVariableNumOfParams;
}
示例2: IndexSingleOperation
public override IEnumerable<ObjectUUID> IndexSingleOperation(AAttributeIndex myIndex, ADBBaseObject myOperationValue, AttributeUUID myAttributeUUID, TypesOfBinaryExpression typeOfBinExpr, DBContext dbContext)
{
IndexKey lookup = new IndexKey(myAttributeUUID, myOperationValue, myIndex.IndexKeyDefinition);
var currentType = dbContext.DBTypeManager.GetTypeByUUID(myIndex.IndexRelatedTypeUUID);
var result = myIndex.Contains(lookup, currentType, dbContext);
if (result.Value)
{
var interestingUUIDs = myIndex.GetValues(lookup, currentType, dbContext);
foreach (var aIndexValue in myIndex.GetAllValues(currentType, dbContext))
{
foreach (var aUUID in aIndexValue)
{
if (!interestingUUIDs.Contains(aUUID))
{
yield return aUUID;
}
}
}
}
else
{
foreach (var aIndexValue in myIndex.GetKeyValues(currentType, dbContext).Select(kv => kv.Value))
{
foreach (var aUUID in aIndexValue)
{
yield return aUUID;
}
}
}
yield break;
}
示例3: SetRefDefinition
public SetRefDefinition(Structures.TupleDefinition tupleDefinition, ADBBaseObject[] myParameters)
{
System.Diagnostics.Debug.Assert(tupleDefinition != null);
this.TupleDefinition = tupleDefinition;
this.Parameters = myParameters;
}
示例4: IndexKey
/// <summary>
/// Adds a single ADBBaseObject to the IndexKex
/// </summary>
/// <param name="myAttributeUUID">AttributeUUID corresponding to the ADBBaseObject</param>
/// <param name="myIndexKeyPayload">The ADBBaseObject that is going to be added</param>
/// <param name="myIndexDefinition">The corresponding IndexKeyDefinition</param>
public IndexKey(AttributeUUID myAttributeUUID, ADBBaseObject myIndexKeyPayload, IndexKeyDefinition myIndexDefinition)
{
if (!myIndexDefinition.IndexKeyAttributeUUIDs.Contains(myAttributeUUID))
{
throw new GraphDBException(new Error_IndexKeyCreationError(myAttributeUUID, myIndexKeyPayload, myIndexDefinition));
}
else
{
AddAAKey(myAttributeUUID, myIndexKeyPayload);
}
}
示例5: IndexSingleOperation
public override IEnumerable<ObjectUUID> IndexSingleOperation(AAttributeIndex myIndex, ADBBaseObject myOperationValue, AttributeUUID myAttributeUUID, TypesOfBinaryExpression typeOfBinExpr, DBContext dbContext)
{
var myIndeyKey = new IndexKey(myAttributeUUID, myOperationValue, myIndex.IndexKeyDefinition);
var currentType = dbContext.DBTypeManager.GetTypeByUUID(myIndex.IndexRelatedTypeUUID);
if (myIndex.Contains(myIndeyKey, currentType, dbContext))
{
foreach (var aUUID in myIndex.GetValues(myIndeyKey, currentType, dbContext))
{
yield return aUUID;
}
}
yield break;
}
示例6: ApplyParams
public override void ApplyParams(params EdgeTypeParamDefinition[] myParams)
{
if (myParams.Count() == 0)
throw new GraphDBException(new Error_EdgeParameterCountMismatch(EdgeTypeName, 0, 1));
// The first parameter has to be the type
if (myParams[0].Type != ParamType.GraphType)
{
throw new GraphDBException(new Error_DataTypeDoesNotMatch(myParams[0].Type.ToString(), "BaseType like 'Integer', 'Double, etc"));
}
else
{
_CountBy = myParams[0].Param as ADBBaseObject;
}
_Count = _CountBy.Clone();
_Count.SetValue(DBObjectInitializeType.Default);
#region Get default node if exists
if (myParams.Any(p => p.Type == ParamType.DefaultValueDef))
{
var def = (from p in myParams where p.Type == ParamType.DefaultValueDef select p).First();
if (_CountBy.IsValidValue(def.Param))
{
_CountBy.SetValue(def.Param);
}
else
{
throw new GraphDBException(new Error_DataTypeDoesNotMatch(_CountBy.ObjectName, def.Param.GetType().Name));
}
}
else
{
_CountBy.SetValue(1);
}
#endregion
CalcEstimatedSize(this);
}
示例7: IndexSingleOperation
public virtual IEnumerable<ObjectUUID> IndexSingleOperation(AAttributeIndex myIndex, ADBBaseObject myOperationValue, AttributeUUID myAttributeUUID, TypesOfBinaryExpression typeOfBinExpr, DBContext dbContext)
{
foreach (var keyValPair in myIndex.GetKeyValues(dbContext.DBTypeManager.GetTypeByUUID(myIndex.IndexRelatedTypeUUID), dbContext))
{
var res = Compare(keyValPair.Key.IndexKeyValues[0], myOperationValue);
if (res.Failed())
{
throw new GraphDBException(res.PushIError(new Error_InvalidIndexOperation(myIndex.IndexName, keyValPair.Key.IndexKeyValues[0].Value, myOperationValue.Value)).IErrors);
}
if (res.Value)
{
foreach (var aUUID in keyValPair.Value)
{
yield return aUUID;
}
}
}
yield break;
}
示例8: Sub
public override void Sub(ADBBaseObject myGraphObject)
{
}
示例9: Contains
/// <summary>
/// Check for a containing element
/// </summary>
/// <param name="myValue"></param>
/// <returns></returns>
public override bool Contains(ADBBaseObject myValue)
{
return _Objects.Contains((ADBBaseObject)myValue);
}
示例10: Add
/// <summary>
/// Adds a new value with some optional parameters
/// </summary>
/// <param name="myValue"></param>
/// <param name="myParameters"></param>
public override void Add(ADBBaseObject myValue, params ADBBaseObject[] myParameters)
{
_Objects.Add(myValue);
}
示例11: Remove
/// <summary>
/// Remove a value
/// </summary>
/// <param name="myValue"></param>
/// <returns></returns>
public override Boolean Remove(ADBBaseObject myValue)
{
return _Objects.Remove((ADBBaseObject)myValue);
}
示例12: ConvertToBestMatchingTypeReverse
private static Boolean ConvertToBestMatchingTypeReverse(ref ADBBaseObject myDBBaseObjectB, ref ADBBaseObject myDBBaseObjectA)
{
#region Both are not unknown
if ((myDBBaseObjectA.Type != BasicType.Unknown) && (myDBBaseObjectB.Type != BasicType.Unknown))
{
#region Types matching, we can leave
if (myDBBaseObjectA.Type == myDBBaseObjectB.Type)
{
return true;
}
#endregion
#region DBList and DBReference are not matchable with other types
else if (myDBBaseObjectA is DBEdge || myDBBaseObjectA is DBReference || myDBBaseObjectB is DBEdge || myDBBaseObjectB is DBReference)
{
return false;
}
#endregion
#region The types does not match - so try to convert the right-handed to the left handed type
else if (myDBBaseObjectA is DBUInt64)
{
//
if (DBUInt64.IsValid(myDBBaseObjectB.Value))
{
myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
return true;
}
return false;
}
else if (myDBBaseObjectA is DBInt64)
{
//
if (DBInt64.IsValid(myDBBaseObjectB.Value))
{
myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
return true;
}
// do not change to ConvertToBestMatchingType(ref myDBBaseObjectB, ref myDBBaseObjectA)
return false;
}
else if (myDBBaseObjectA is DBDouble)
{
//
if (DBDouble.IsValid(myDBBaseObjectB.Value))
{
myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
return true;
}
return false;
}
else if (myDBBaseObjectA is DBDateTime)
{
//
if (DBDateTime.IsValid(myDBBaseObjectB.Value))
{
myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
return true;
}
return false;
}
else if (myDBBaseObjectA is DBBoolean)
{
//
if (DBDouble.IsValid(myDBBaseObjectB.Value))
{
myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
return true;
}
return false;
}
else if (myDBBaseObjectA is DBString)
{
//
if (DBString.IsValid(myDBBaseObjectB.Value))
{
myDBBaseObjectB = myDBBaseObjectA.Clone(myDBBaseObjectB.Value);
return true;
}
return false;
}
#endregion
// we couldnt find a matching type for both are not unknown
return false;
}
//.........这里部分代码省略.........
示例13: Remove
/// <summary>
/// Remove a value
/// </summary>
/// <param name="myValue"></param>
/// <returns></returns>
public abstract Boolean Remove(ADBBaseObject myValue);
示例14: Sub
public override ADBBaseObject Sub(ADBBaseObject myGraphObjectA, ADBBaseObject myGraphObjectB)
{
throw new NotImplementedException();
}
示例15: Error_EdgeParameterTypeMismatch
public Error_EdgeParameterTypeMismatch(ADBBaseObject currentType, params ADBBaseObject[] expectedTypes)
{
CurrentType = currentType;
ExpectedTypes = expectedTypes;
}