MCPcopy Create free account
hub / github.com/apache/paimon-rust / create_database

Method create_database

crates/paimon/src/api/rest_api.rs:229–239  ·  view source on GitHub ↗

Create a new database.

(
        &self,
        name: &str,
        options: Option<HashMap<String, String>>,
    )

Source from the content-addressed store, hash-verified

227
228 /// Create a new database.
229 pub async fn create_database(
230 &self,
231 name: &str,
232 options: Option<HashMap<String, String>>,
233 ) -> Result<()> {
234 validate_non_empty(name, "database name")?;
235 let path = self.resource_paths.databases();
236 let request = CreateDatabaseRequest::new(name.to_string(), options.unwrap_or_default());
237 let _resp: serde_json::Value = self.client.post(&path, &request).await?;
238 Ok(())
239 }
240
241 /// Get database information.
242 pub async fn get_database(&self, name: &str) -> Result<GetDatabaseResponse> {

Callers 1

mainFunction · 0.45

Calls 3

validate_non_emptyFunction · 0.85
databasesMethod · 0.80
postMethod · 0.80

Tested by

no test coverage detected