mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-04-29 02:22:24 +00:00
Remove the excessive examples/
This commit is contained in:
parent
610aea0221
commit
d155b7d33d
10
README.md
10
README.md
@ -6,18 +6,9 @@ The package provides an interface to [SQLite][1].
|
|||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
The example given below can be ran using the following command:
|
|
||||||
|
|
||||||
```
|
|
||||||
cargo run --example workflow
|
|
||||||
```
|
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
extern crate sqlite;
|
|
||||||
|
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
fn main() {
|
|
||||||
let database = sqlite::open(&Path::new(":memory:")).unwrap();
|
let database = sqlite::open(&Path::new(":memory:")).unwrap();
|
||||||
|
|
||||||
database.execute(r#"
|
database.execute(r#"
|
||||||
@ -31,7 +22,6 @@ fn main() {
|
|||||||
}
|
}
|
||||||
true
|
true
|
||||||
}).unwrap();
|
}).unwrap();
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
extern crate sqlite;
|
|
||||||
|
|
||||||
use std::path::Path;
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
let database = sqlite::open(&Path::new(":memory:")).unwrap();
|
|
||||||
|
|
||||||
database.execute(r#"
|
|
||||||
CREATE TABLE `users` (id INTEGER, name VARCHAR(255));
|
|
||||||
INSERT INTO `users` (id, name) VALUES (1, 'Alice');
|
|
||||||
"#).unwrap();
|
|
||||||
|
|
||||||
database.process("SELECT * FROM `users`;", |pairs| {
|
|
||||||
for &(column, value) in pairs.iter() {
|
|
||||||
println!("{} = {}", column, value.unwrap());
|
|
||||||
}
|
|
||||||
true
|
|
||||||
}).unwrap();
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user