當前位置: 首頁>>代碼示例>>Python>>正文


Python Database.remove方法代碼示例

本文整理匯總了Python中arangodb.api.Database.remove方法的典型用法代碼示例。如果您正苦於以下問題:Python Database.remove方法的具體用法?Python Database.remove怎麽用?Python Database.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在arangodb.api.Database的用法示例。


在下文中一共展示了Database.remove方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_create_and_delete_database

# 需要導入模塊: from arangodb.api import Database [as 別名]
# 或者: from arangodb.api.Database import remove [as 別名]
    def test_create_and_delete_database(self):

        database_name = 'test_foo_123'

        db = Database.create(name=database_name)

        self.assertIsNotNone(db)

        Database.remove(name=database_name)
開發者ID:garym,項目名稱:ArangoPy,代碼行數:11,代碼來源:tests.py

示例2: tearDown

# 需要導入模塊: from arangodb.api import Database [as 別名]
# 或者: from arangodb.api.Database import remove [as 別名]
    def tearDown(self):
        # Delete index
        self.geo_index.delete()
        self.hash_index.delete()
        self.fulltext_index.delete()
        self.skiplist_index.delete()

        # They need to be deleted
        Collection.remove(name=self.test_1_col.name)

        Database.remove(name=self.database_name)
開發者ID:garym,項目名稱:ArangoPy,代碼行數:13,代碼來源:tests.py

示例3: tearDown

# 需要導入模塊: from arangodb.api import Database [as 別名]
# 或者: from arangodb.api.Database import remove [as 別名]
 def tearDown(self):
     Database.remove(name=self.database_name)
開發者ID:morsdatum,項目名稱:ArangoPy,代碼行數:4,代碼來源:model.py

示例4: tearDown

# 需要導入模塊: from arangodb.api import Database [as 別名]
# 或者: from arangodb.api.Database import remove [as 別名]
    def tearDown(self):
        # They need to be deleted
        Collection.remove(name=self.test_1_col.name)
        Collection.remove(name=self.test_2_col.name)

        Database.remove(name=self.database_name)
開發者ID:saeschdivara,項目名稱:ArangoPy,代碼行數:8,代碼來源:escaping.py

示例5: tearDown

# 需要導入模塊: from arangodb.api import Database [as 別名]
# 或者: from arangodb.api.Database import remove [as 別名]
 def tearDown(self):
     Collection.remove(name=self.operating_collection)
     Database.remove(name=self.database_name)
開發者ID:morsdatum,項目名稱:ArangoPy,代碼行數:5,代碼來源:transaction.py

示例6: print

# 需要導入模塊: from arangodb.api import Database [as 別名]
# 或者: from arangodb.api.Database import remove [as 別名]
    all_aql_query.execute()

# Everything needs to be in one try-catch so we can clean up afterwards
try:

    big_collection_name = 'big_collection'
    big_collection = Collection.create(big_collection_name)

    print('All tests are using either %s documents, edges or models' % document_number)

    # Create first all documents
    create_big_number_of_documents(big_collection)

    # Get all documents normally
    retrieve_normally_documents(big_collection)

    # Get documents with simple query
    retrieve_simply_documents(big_collection)

    # Get documents with aql
    retrieve_aql_documents(big_collection)

    # Delete all documents
    Collection.remove(big_collection_name)

except Exception as err:
    print(err)

# Destroy at the end the database
Database.remove(database_name)
開發者ID:morsdatum,項目名稱:ArangoPy,代碼行數:32,代碼來源:arangopy-speed-tests.py

示例7: tearDown

# 需要導入模塊: from arangodb.api import Database [as 別名]
# 或者: from arangodb.api.Database import remove [as 別名]
    def tearDown(self):
	Collection.remove(name=self.collection1_name)
	Collection.remove(name=self.collection2_name)
	Collection.remove(name=self.coll3_name)
	Collection.remove(name=self.coll4_name)
	Database.remove(name=self.database_name)
開發者ID:morsdatum,項目名稱:ArangoPy,代碼行數:8,代碼來源:integerdoc.py


注:本文中的arangodb.api.Database.remove方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。