Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
158
Issues
158
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
a6cc37fb
Commit
a6cc37fb
authored
Nov 16, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FLOW][DB] fix name 255 in db.
parent
401c86e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Flow.hs
src/Gargantext/Database/Flow.hs
+2
-2
Insert.hs
src/Gargantext/Database/Node/Document/Insert.hs
+2
-2
No files found.
src/Gargantext/Database/Flow.hs
View file @
a6cc37fb
...
...
@@ -59,6 +59,7 @@ flowDatabase ff fp cName = do
ids
<-
runCmd'
$
insertDocuments
masterUserId
corpusId
hyperdataDocuments
printDebug
"Docs IDs : "
(
length
ids
)
idsRepeat
<-
runCmd'
$
insertDocuments
masterUserId
corpusId
hyperdataDocuments
printDebug
"Repeated Docs IDs : "
(
length
ids
)
-- Ngrams Flow
let
documentsWithId
=
mergeData
(
toInserted
ids
)
(
toInsert
hyperdataDocuments
)
...
...
@@ -69,7 +70,7 @@ flowDatabase ff fp cName = do
-- List Flow
listId2
<-
runCmd'
$
listFlow
masterUserId
corpusId
indexedNgrams
printDebug
"list id
:
"
listId2
printDebug
"list id
:
"
listId2
printDebug
"Docs IDs : "
(
length
idsRepeat
)
...
...
@@ -110,7 +111,6 @@ subFlow username cName = do
------------------------------------------------------------------------
type
HashId
=
Text
type
NodeId
=
Int
type
ListId
=
Int
...
...
src/Gargantext/Database/Node/Document/Insert.hs
View file @
a6cc37fb
...
...
@@ -73,7 +73,7 @@ import Database.PostgreSQL.Simple.ToRow (ToRow(..))
import
Database.PostgreSQL.Simple.Types
(
Values
(
..
),
QualifiedIdentifier
(
..
))
import
Data.Text
(
Text
)
import
qualified
Data.Text
as
DT
(
pack
,
unpack
,
concat
)
import
qualified
Data.Text
as
DT
(
pack
,
unpack
,
concat
,
take
)
import
qualified
Data.Digest.Pure.SHA
as
SHA
(
sha256
,
showDigest
)
import
qualified
Data.ByteString.Lazy.Char8
as
DC
(
pack
)
...
...
@@ -151,7 +151,7 @@ queryInsert = [sql|
prepare
::
UserId
->
ParentId
->
[
HyperdataDocument
]
->
[
InputData
]
prepare
uId
pId
=
map
(
\
h
->
InputData
tId
uId
pId
(
maybe
"No Title of Document"
identity
$
_hyperdataDocument_title
h
)
(
DT
.
take
255
<$>
maybe
"No Title of Document"
identity
$
_hyperdataDocument_title
h
)
(
toJSON
h
)
)
where
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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