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
Memri
Flutter App for Memri
Commits
0326ab05
Commit
0326ab05
authored
4 years ago
by
Azat Alimov
Browse files
Options
Download
Email Patches
Plain Diff
fixed item receiving from edge
parent
8445b4cf
Pipeline
#2087
failed with stages
in 30 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/MemriApp/CVU/resolving/CVULookupController.dart
+6
-4
lib/MemriApp/CVU/resolving/CVULookupController.dart
lib/MemriApp/Controllers/Database/ItemEdgeRecord.dart
+2
-2
lib/MemriApp/Controllers/Database/ItemEdgeRecord.dart
lib/MemriApp/Controllers/Database/ItemRecord.dart
+11
-0
lib/MemriApp/Controllers/Database/ItemRecord.dart
with
19 additions
and
6 deletions
+19
-6
lib/MemriApp/CVU/resolving/CVULookupController.dart
+
6
-
4
View file @
0326ab05
...
...
@@ -514,10 +514,12 @@ class CVULookupController {
.
toList
();
return
LookupStepItems
(
await
filter
(
result
,
subexpression
,
db
));
}
else
{
List
<
ItemRecord
>
result
=
(
await
Future
.
wait
(
items
.
map
((
item
)
async
=
>
await
item
.
edgeItem
(
trimmedName
,
db
))))
.
whereType
<
ItemRecord
>()
.
toList
();
List
<
ItemRecord
>
result
=
[];
await
Future
.
forEach
(
items
,
(
ItemRecord
item
)
async
{
var
itemRecord
=
await
item
.
edgeItem
(
trimmedName
,
db
);
if
(
itemRecord
!=
null
)
result
.
add
(
itemRecord
);
});
return
LookupStepItems
(
await
filter
(
result
,
subexpression
,
db
));
}
}
else
{
...
...
This diff is collapsed.
Click to expand it.
lib/MemriApp/Controllers/Database/ItemEdgeRecord.dart
+
2
-
2
View file @
0326ab05
...
...
@@ -56,11 +56,11 @@ class ItemEdgeRecord {
}
Future
<
ItemRecord
?
>
owningItem
(
DatabaseController
db
)
async
{
return
await
ItemRecord
.
fetchWith
U
ID
(
source
U
ID
!
,
db
);
return
await
ItemRecord
.
fetchWith
Row
ID
(
source
Row
ID
!
,
db
);
}
Future
<
ItemRecord
?
>
targetItem
(
DatabaseController
db
)
async
{
return
await
ItemRecord
.
fetchWith
U
ID
(
target
U
ID
!
,
db
);
return
await
ItemRecord
.
fetchWith
Row
ID
(
target
Row
ID
!
,
db
);
}
/*
...
...
This diff is collapsed.
Click to expand it.
lib/MemriApp/Controllers/Database/ItemRecord.dart
+
11
-
0
View file @
0326ab05
...
...
@@ -145,6 +145,17 @@ class ItemRecord extends Equatable {
}
}
static
Future
<
ItemRecord
?
>
fetchWithRowID
(
int
id
,
[
DatabaseController
?
db
])
async
{
db
??=
AppController
.
shared
.
databaseController
;
try
{
Item
item
=
await
db
.
databasePool
.
itemRecordFetchWithRowId
(
id
);
return
ItemRecord
.
fromItem
(
item
);
}
catch
(
e
)
{
print
(
e
);
return
null
;
}
}
Future
<
int
>
insert
(
Database
db
)
async
{
return
await
db
.
itemRecordInsert
(
this
);
}
...
...
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