Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
c5f683ca
Verified
Commit
c5f683ca
authored
2 years ago
by
Denis Smirnov
Browse files
Options
Downloads
Patches
Plain Diff
refactoring: preprocessing for non-mock imports
parent
21f90b86
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1414
sbroad import
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sbroad-core/src/backend/sql/space.rs
+10
-10
10 additions, 10 deletions
sbroad-core/src/backend/sql/space.rs
sbroad-core/src/otm.rs
+9
-7
9 additions, 7 deletions
sbroad-core/src/otm.rs
sbroad-core/src/otm/fiber.rs
+1
-1
1 addition, 1 deletion
sbroad-core/src/otm/fiber.rs
with
20 additions
and
18 deletions
sbroad-core/src/backend/sql/space.rs
+
10
−
10
View file @
c5f683ca
...
...
@@ -4,17 +4,17 @@ use crate::executor::ir::ExecutionPlan;
use
crate
::
ir
::
relation
::
SpaceEngine
;
#[cfg(not(feature
=
"mock"
))]
use
crate
::
error
;
#[cfg(not(feature
=
"mock"
))]
use
crate
::
errors
::{
Action
,
Entity
};
#[cfg(not(feature
=
"mock"
))]
use
crate
::
ir
::
value
::
EncodedValue
;
#[cfg(not(feature
=
"mock"
))]
use
tarantool
::
index
::{
FieldType
,
IndexOptions
,
IndexType
,
Part
}
;
#[cfg(not(feature
=
"mock"
))]
use
tarantool
::
space
::{
Field
,
Space
,
SpaceCreateOptions
};
mod
prod_imports
{
pub
use
crate
::
error
;
pub
use
crate
::
errors
::{
Action
,
Entity
};
pub
use
crate
::
ir
::
value
::
EncodedValue
;
pub
use
tarantool
::
index
::{
FieldType
,
IndexOptions
,
IndexType
,
Part
}
;
pub
use
tarantool
::
space
::{
Field
,
Space
,
SpaceCreateOptions
};
pub
use
tarantool
::
tuple
::
Tuple
;
}
#[cfg(not(feature
=
"mock"
))]
use
tarantool
::
tuple
::
Tuple
;
use
prod_imports
::
*
;
#[allow(clippy::module_name_repetitions)]
#[derive(Hash,
Eq,
PartialEq,
Debug)]
...
...
This diff is collapsed.
Click to expand it.
sbroad-core/src/otm.rs
+
9
−
7
View file @
c5f683ca
...
...
@@ -27,17 +27,19 @@ use std::cell::RefCell;
use
std
::
collections
::
HashMap
;
use
std
::
fmt
::{
Debug
,
Formatter
};
mod
fiber
;
pub
mod
fiber
;
pub
mod
statistics
;
#[cfg(not(feature
=
"mock"
))]
use
crate
::
warn
;
#[cfg(not(feature
=
"mock"
))]
use
fiber
::
fiber_id
;
#[cfg(not(feature
=
"mock"
))]
use
tarantool
::
error
::
Error
as
TntError
;
mod
prod_imports
{
pub
use
crate
::
warn
;
pub
use
crate
::
otm
::
fiber
::
fiber_id
;
pub
use
tarantool
::
error
::
Error
as
TntError
;
pub
use
tarantool
::
transaction
::
start_transaction
;
}
#[cfg(not(feature
=
"mock"
))]
use
tarantool
::
transaction
::
start_transaction
;
use
prod_imports
::
*
;
static
TRACER_NAME
:
&
str
=
"libsbroad"
;
static
RATIO
:
f64
=
0.01
;
...
...
This diff is collapsed.
Click to expand it.
sbroad-core/src/otm/fiber.rs
+
1
−
1
View file @
c5f683ca
#[cfg(not(feature
=
"mock"
))]
pub
(
super
)
fn
fiber_id
()
->
u64
{
pub
fn
fiber_id
()
->
u64
{
let
lua
=
tarantool
::
lua_state
();
lua
.get
::
<
tarantool
::
tlua
::
LuaFunction
<
_
>
,
_
>
(
"fiber_id"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment