File tree 7 files changed +2485
-0
lines changed 7 files changed +2485
-0
lines changed Original file line number Diff line number Diff line change
1
+ .idea /
2
+ target /
3
+ Cargo.lock
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " rorm-lib"
3
+ version = " 0.2.0"
4
+ edition = " 2021"
5
+ keywords = [" database" , " library" ]
6
+ authors = [" myOmikron <git@omikron.dev>" ]
7
+ categories = [" database" , " development-tools.categories.ffi" ]
8
+ repository = " https://github.com/myOmikron/drorm"
9
+ homepage = " https://rorm.rs"
10
+ documentation = " https://docs.rorm.rs"
11
+ license = " MIT"
12
+ description = " The FFI bindings to C."
13
+
14
+ [lib ]
15
+ name = " rorm"
16
+ crate-type = [" staticlib" , " cdylib" ]
17
+
18
+ [dependencies ]
19
+ rorm-db = { version = " ~0.2" , path = " ../rorm-db" }
20
+
21
+ # Runtime to execute the async context in
22
+ tokio = { version = " ^1.21" }
23
+
24
+ # Async wrapper
25
+ futures = { version = " ^0.3" }
26
+
27
+ # SQLX is only needed for error unwrapping
28
+ sqlx = { version = " ^0.6" }
29
+
30
+ # Date and time library
31
+ chrono = { version = " ^0.4" }
32
+
33
+ [features ]
34
+ default = [
35
+ " rorm-db/tokio-rustls" ,
36
+ " tokio/rt-multi-thread" ,
37
+ ]
Original file line number Diff line number Diff line change
1
+ # rorm-lib
2
+
3
+ ` rorm-lib ` provides FFI bindings for ` rorm-db ` .
4
+
5
+ With the help of this crate, it is possible for other languages to use the orm.
6
+
7
+ To provide a similar experience as ` rorm ` for users, it is required to build
8
+ an additional layer upon this binding as well as an interface for ` rorm-cli ` .
Original file line number Diff line number Diff line change
1
+ use crate :: FFIString ;
2
+
3
+ /**
4
+ Representation of all error codes.
5
+ */
6
+ #[ repr( C ) ]
7
+ #[ derive( Debug ) ]
8
+ pub enum Error < ' a > {
9
+ /// Everything's fine, nothing to worry about.
10
+ NoError ,
11
+ /// Runtime was destroyed or never created and can therefore not be accessed.
12
+ MissingRuntimeError ,
13
+ /// An error occurred while getting or accessing the runtime.
14
+ RuntimeError ( FFIString < ' a > ) ,
15
+ /// An error occurred while trying to convert a FFIString into a &str due to invalid content
16
+ InvalidStringError ,
17
+ /// Configuration error
18
+ ConfigurationError ( FFIString < ' a > ) ,
19
+ /// Database error
20
+ DatabaseError ( FFIString < ' a > ) ,
21
+ /// There are no rows left in the stream
22
+ NoRowsLeftInStream ,
23
+ /// Column could not be converted in the given type
24
+ ColumnDecodeError ,
25
+ /// Column was not found in row
26
+ ColumnNotFoundError ,
27
+ /// The index in the row was out of bounds
28
+ ColumnIndexOutOfBoundsError ,
29
+ /// The provided date could not be parsed
30
+ InvalidDateError ,
31
+ /// The provided time could not be parsed
32
+ InvalidTimeError ,
33
+ /// The provided datetime could not be parsed
34
+ InvalidDateTimeError ,
35
+ }
You can’t perform that action at this time.
0 commit comments