gopkg.in/rethinkdb/rethinkdb-go.v6@v6.2.2/query_db.go (about)

     1  package rethinkdb
     2  
     3  import (
     4  	p "gopkg.in/rethinkdb/rethinkdb-go.v6/ql2"
     5  )
     6  
     7  // DBCreate creates a database. A RethinkDB database is a collection of tables,
     8  // similar to relational databases.
     9  //
    10  // Note: that you can only use alphanumeric characters and underscores for the
    11  // database name.
    12  func DBCreate(args ...interface{}) Term {
    13  	return constructRootTerm("DBCreate", p.Term_DB_CREATE, args, map[string]interface{}{})
    14  }
    15  
    16  // DBDrop drops a database. The database, all its tables, and corresponding data
    17  // will be deleted.
    18  func DBDrop(args ...interface{}) Term {
    19  	return constructRootTerm("DBDrop", p.Term_DB_DROP, args, map[string]interface{}{})
    20  }
    21  
    22  // DBList lists all database names in the system.
    23  func DBList(args ...interface{}) Term {
    24  	return constructRootTerm("DBList", p.Term_DB_LIST, args, map[string]interface{}{})
    25  }