Skip to content

Commit 250b8fd

Browse files
garrensmithPierreZ
authored andcommitted
setup
1 parent f41fa13 commit 250b8fd

File tree

5 files changed

+50
-2
lines changed

5 files changed

+50
-2
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
use crate::Transaction;
2+
3+
pub struct Directory;
4+
5+
// use crate::transactions::{Transaction};
6+
7+
impl Directory {
8+
9+
pub fn create_or_open(trx: Transaction, path: Option<&str>, layer: Option<&[u8]> ) -> bool {
10+
false
11+
}
12+
13+
}

foundationdb/src/directory/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pub mod directory;
2+
3+
pub use directory::*;
4+
5+

foundationdb/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ pub mod api;
100100
#[cfg(any(feature = "fdb-5_1", feature = "fdb-5_2", feature = "fdb-6_0"))]
101101
pub mod cluster;
102102
mod database;
103+
mod directory;
103104
mod error;
104105
pub mod future;
105106
mod keyselector;
@@ -117,6 +118,7 @@ pub use crate::error::FdbError;
117118
pub use crate::error::FdbResult;
118119
pub use crate::keyselector::*;
119120
pub use crate::transaction::*;
121+
pub use crate::directory::*;
120122

121123
/// Initialize the FoundationDB Client API, this can only be called once per process.
122124
///

foundationdb/tests/directory.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Copyright 2018 foundationdb-rs developers, https://github.com/Clikengo/foundationdb-rs/graphs/contributors
2+
//
3+
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
4+
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
5+
// http://opensource.org/licenses/MIT>, at your option. This file may not be
6+
// copied, modified, or distributed except according to those terms.
7+
8+
use foundationdb::*;
9+
use futures::future;
10+
use futures::prelude::*;
11+
12+
mod common;
13+
14+
async fn test_create_or_open_async() -> FdbResult<()> {
15+
let db = common::database().await?;
16+
let trx = db.create_trx()?;
17+
let out = Directory::create_or_open(trx);
18+
assert!(out);
19+
20+
Ok(())
21+
}
22+
23+
#[test]
24+
fn test_create_or_open() {
25+
common::boot();
26+
futures::executor::block_on(test_create_or_open_async()).expect("failed to run");
27+
}
28+

scripts/run_bindingtester.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ fdb_rs_dir=$(pwd)
66
bindingtester="${fdb_rs_dir:?}/$1"
77
case $(uname) in
88
Darwin)
9-
brew install mono
9+
# brew install mono
1010
;;
1111
Linux)
1212
sudo apt update
@@ -22,7 +22,7 @@ esac
2222
cd ${fdb_builddir:?}
2323

2424
## Get foundationdb source
25-
git clone --depth 1 https://github.com/apple/foundationdb.git -b release-6.1
25+
# git clone --depth 1 https://github.com/apple/foundationdb.git -b release-6.1
2626
cd foundationdb
2727
git checkout release-6.1
2828

0 commit comments

Comments
 (0)