1
0
Fork 0

Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel

This commit is contained in:
Michael Hackstein 2014-06-05 14:58:10 +02:00
commit 8b7b485f74
7 changed files with 63 additions and 43 deletions

View File

@ -3,6 +3,7 @@ all: build-books
.PHONY: md-files
MDPP_FILES = $(wildcard *.mdpp */*.mdpp */*/*.mdpp)
MD_FILES = $(wildcard Users/*/*.md)
md-files:
@for file in $(basename $(MDPP_FILES)); do echo "converting $${file}.mdpp"; markdown-pp.py $${file}.mdpp $${file}.md; done
@ -18,3 +19,5 @@ build-book:
@test -d books/$(NAME) || mkdir books/$(NAME)
cd $(NAME) && gitbook build -o ../books/$(NAME)
cp Users/arangodb_logo2.png books/Users/
@for file in $(basename $(MD_FILES)); do echo "remove $${file}.md";rm $${file}.md;done

View File

@ -1,32 +0,0 @@
!CHAPTER Address of a Collection
All collections in ArangoDB have an unique identifier and an unique
name. ArangoDB internally uses the collection's unique identifier to look up
collections. This identifier, however, is managed by ArangoDB and the user has
no control over it. In order to allow users to use their own names, each collection
also has an unique name which is specified by the user. To access a collection
from the user perspective, the collection name should be used, i.e.:
*db._collection(collection-name)*
A collection is created by a ["db._create"](../Collections/DatabaseMethods.md) call.
For example: Assume that the collection identifier is `7254820` and the name is
`demo`, then the collection can be accessed as:
db._collection("demo")
If no collection with such a name exists, then *null* is returned.
There is a short-cut that can be used for non-system collections:
*db.collection-name*
This call will either return the collection named *db.collection-name* or create
a new one with that name and a set of default properties.
Note: Creating a collection on the fly using *db.collection-name* is
not recommend and does not work in _arangosh_. To create a new collection, please
use
*db._create(collection-name)*

View File

@ -1,6 +1,7 @@
!CHAPTER Collection Methods
`collection.drop()`
Drops a collection and all its indexes.
*Examples*

View File

@ -7,4 +7,40 @@ corresponding language API.
The most import call is the call to create a new collection
<!--
, see @ref HandlingCollectionsCreate "db._create".
-->
-->
!SECTION Address of a Collection
All collections in ArangoDB have an unique identifier and an unique
name. ArangoDB internally uses the collection's unique identifier to look up
collections. This identifier, however, is managed by ArangoDB and the user has
no control over it. In order to allow users to use their own names, each collection
also has an unique name which is specified by the user. To access a collection
from the user perspective, the collection name should be used, i.e.:
`db._collection(collection-name)``
A collection is created by a ["db._create"](../Collections/DatabaseMethods.md) call.
For example: Assume that the collection identifier is `7254820` and the name is
`demo`, then the collection can be accessed as:
db._collection("demo")
If no collection with such a name exists, then *null* is returned.
There is a short-cut that can be used for non-system collections:
*db.collection-name*
This call will either return the collection named *db.collection-name* or create
a new one with that name and a set of default properties.
Note: Creating a collection on the fly using *db.collection-name* is
not recommend and does not work in _arangosh_. To create a new collection, please
use
`db._create(collection-name)`
This call will create a new collection called *collection-name*.

View File

@ -1,10 +1,12 @@
!CHAPTER Notes about Databases
Please keep in mind that each database contains its own system collections,
which need to set up when a database is created. This will make the creation
of a database take a while. Replication is configured on a per-database level,
meaning that any replication logging or applying for a new database must
be configured explicitly after a new database has been created. Foxx applications
which need to set up when a database is created. This will make the creation of a database take a while.
Replication is configured on a per-database level, meaning that any replication logging or applying for a new database must
be configured explicitly after a new database has been created.
Foxx applications
are also available only in the context of the database they have been installed
in. A new database will only provide access to the system applications shipped
with ArangoDB (that is the web interface at the moment) and no other Foxx

View File

@ -24,7 +24,6 @@
* [Notes about Databases](Databases/Notes.md)
<!-- 6 -->
* [Handling Collections](Collections/README.md)
* [Address of a Collection](Collections/CollectionAddress.md)
* [Collection Methods](Collections/CollectionMethods.md)
* [Database Methods](Collections/DatabaseMethods.md)
<!-- 7 -->

View File

@ -1,6 +1,7 @@
import os
import inspect
def file_content(filepath):
""" Fetches and formats file's content to perform the required operation.
"""
@ -28,7 +29,7 @@ def fetch_comments(dirpath):
"""
comments_filename = "allComments.txt"
fh = open(comments_filename, "w")
fh = open(comments_filename, "a")
for root, directories, files in os.walk(dirpath):
for filename in files:
@ -37,7 +38,7 @@ def fetch_comments(dirpath):
for comment in file_comments:
fh.write("\n<!-- filename: %s -->\n" % filename)
for _com in comment:
_text = _com.replace("/", "")
_text = _com.replace("///", "")
if len(_text.strip()) == 0:
_text = _text.replace("\n", "<br />")
_text = _text.strip()
@ -51,5 +52,15 @@ def fetch_comments(dirpath):
fh.close()
if __name__ == "__main__":
dirpath = "/Users/Thomas/code/ArangoDB"
fetch_comments(dirpath)
open("allComments.txt", "w").close()
path = ["arangod/cluster","arangod/RestHandler","arangod/V8Server",
"lib/Admin","lib/HttpServer",
"js/actions","js/client","js/apps","js/common","js/server"]
for i in path:
dirpath = os.path.abspath(os.path.join(os.path.dirname( __file__ ), os.pardir,"ArangoDB/../../"+i))
fetch_comments(dirpath)
print dirpath
os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..', 'templates'))