Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bradley Matusiak
POD
Commits
20f40c48
Unverified
Commit
20f40c48
authored
4 years ago
by
Vasili Novikov
Browse files
Options
Download
Email Patches
Plain Diff
Fix rustfmt
parent
b0ecda53
dev
add-port-mapping-for-plugins
aziz/build_cache
aziz/delete_user
aziz/stop_plugins
busy_duration
cache-fix
cbindgen
ci-cd
ci-cd-clean
ci-cd-new
ci-fix
do-push-test
err_on_invalid_property
fix-gitlab-ci-caching
flutter_lib
gql-docs
gql-metadata
graphQL-prototype
java_lib
java_lib_20
java_lib_20_jni
jenkins_build
limit-req-plugins
main
merge_request
merge_test
per-type-properties-and-deduplication
plugin-logging
release-2.2.0
search-offset
search-sort-by-id
swift_lib
sz/account_resend_mail
sz/audit_db_connection_pool
sz/bulk_measurements
sz/change_dir_layout_of_integration_tests
sz/db_bench
sz/drop_idle_connections
sz/fixing_db_pool
sz/get_schema_boost
sz/health_endpoint_2
sz/infra_stress_test
sz/monitoring_plugin_state
sz/pod_plugin_triggering_different_trigger_types
sz/pod_sharing_poc
sz/search_experiments
sz/silly_things
sz/stateless_pod
sz/stateless_pod_2
sz/wip_hash_history_of_schemas
sz/wip_namespaces
temporary-quickfix-property-insertion
twitter-oauth
uat
update-deep-joins
v5_docs
0.3.0
v0.5.0
v0.3.1-dev-platform-freeze
last-version-with-warp
last-version-using-old-schema
actix-web
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/internal_api.rs
+8
-2
src/internal_api.rs
with
8 additions
and
2 deletions
+8
-2
src/internal_api.rs
+
8
-
2
View file @
20f40c48
...
...
@@ -218,7 +218,12 @@ pub fn bulk_tx(
}
pub
fn
create_edge
(
tx
:
&
Tx
,
query
:
CreateEdge
)
->
Result
<
String
>
{
let
CreateEdge
{
source
,
target
,
name
,
self_id
}
=
query
;
let
CreateEdge
{
source
,
target
,
name
,
self_id
,
}
=
query
;
let
(
self_rowid
,
self_id
)
=
if
let
Some
(
id
)
=
self_id
{
let
self_rowid
=
database_api
::
get_item_rowid
(
tx
,
&
id
)
?
.ok_or_else
(||
Error
{
code
:
StatusCode
::
BAD_REQUEST
,
...
...
@@ -228,7 +233,8 @@ pub fn create_edge(tx: &Tx, query: CreateEdge) -> Result<String> {
}
else
{
let
date
=
Utc
::
now
()
.timestamp_millis
();
let
self_id
=
new_random_item_id
();
let
self_rowid
=
database_api
::
insert_item_base
(
tx
,
&
self_id
,
"Edge"
,
date
,
date
,
date
,
false
)
?
;
let
self_rowid
=
database_api
::
insert_item_base
(
tx
,
&
self_id
,
"Edge"
,
date
,
date
,
date
,
false
)
?
;
(
self_rowid
,
self_id
)
};
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets