Esempio n. 1
0
        /// <summary>
        /// Collection into which to insert
        /// </summary>
        public AqlQuery In(string collectionName)
        {
            ArangoUtils.ValidateCollectionName(collectionName);
            CollectionName = collectionName;

            doneCallback.Invoke(this);

            return(query);
        }
Esempio n. 2
0
        public AqlRemoveOperation(
            AqlExpression keyExpression,
            string collectionName,
            JsonObject options = null
            )
        {
            ArangoUtils.ValidateCollectionName(collectionName);

            KeyExpression  = keyExpression;
            CollectionName = collectionName;
            Options        = options ?? new JsonObject();
        }
        public AqlInsertOperation(
            AqlExpression expression,
            string collectionName,
            JsonObject options = null
            )
        {
            ArangoUtils.ValidateCollectionName(collectionName);

            Expression     = expression;
            CollectionName = collectionName;
            Options        = options ?? new JsonObject();
        }
Esempio n. 4
0
        /// <summary>
        /// Creates new collection of given type or throws an arango exception
        /// </summary>
        /// <exception cref="ArangoException"></exception>
        public Collection CreateCollection(
            string collectionName,
            CollectionType type
            )
        {
            if (Collections.ContainsKey(collectionName))
            {
                throw new ArangoException(409, 1207, "duplicate name");
            }

            ArangoUtils.ValidateCollectionName(collectionName);

            Collections[collectionName] = new Collection(collectionName, type);

            return(Collections[collectionName]);
        }