Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 18 16:58

    darkfrog26 on 2.4.3

    (compare)

  • May 18 16:58

    darkfrog26 on master

    Release 2.4.3 (compare)

  • May 18 16:39

    darkfrog26 on master

    Added REMOVE support to DSL and… (compare)

  • May 18 16:32

    darkfrog26 on upgrades

    Continued work on updating to r… (compare)

  • Apr 30 14:54

    darkfrog26 on upgrades

    Continued upgrade (compare)

  • Apr 27 20:52

    darkfrog26 on upgrades

    Began upgrade (compare)

  • Mar 14 18:13
    darkfrog26 commented #26
  • Mar 14 17:21
    dpennell opened #26
  • Jan 12 16:20
    darkfrog26 commented #22
  • Jan 05 14:07
    dpennell closed #25
  • Jan 05 14:07
    dpennell commented #25
  • Jan 04 20:33
    darkfrog26 commented #25
  • Jan 04 20:10
    dpennell edited #25
  • Jan 04 20:09
    dpennell opened #25
  • Dec 28 2020 00:01
    darkfrog26 commented #24
  • Dec 27 2020 21:31
    dwlizlo commented #24
  • Dec 27 2020 21:13
    darkfrog26 commented #24
  • Dec 27 2020 21:09
    dwlizlo opened #24
  • Dec 27 2020 20:38
    darkfrog26 commented #23
  • Dec 27 2020 18:56
    darkfrog26 commented #22
elyphas
@elyphas
:)

why aren't you modeling after the graph structure? https://github.com/outr/scarango/blob/master/driver/src/test/scala/spec/GraphSpec.scala#L156

but I will check it out the code, thank you.

Matt Hicks
@darkfrog26
that's a lower level layer
elyphas
@elyphas
ah, :)
Matt Hicks
@darkfrog26
for complex libraries like this, I generally create multiple layers of abstraction to keep the code more manageable
it also offers flexibility if you need to do more advanced things the library doesn't directly support
the ideal though is to use the greatest abstraction as it should also be the easiest to manage and maintain
elyphas
@elyphas
I misunderstood the Graph in this context, I thounght it refers how to model graph
Matt Hicks
@darkfrog26
yeah, that can be misleading
elyphas
@elyphas

why aren't you modeling after the graph structure? https://github.com/outr/scarango/blob/master/driver/src/test/scala/spec/GraphSpec.scala#L156

the first time I see this

Matt Hicks
@darkfrog26
it's linked to from the README. :-p
elyphas
@elyphas
oh year saw it :)
but I thought other thing

why aren't you modeling after the graph structure? https://github.com/outr/scarango/blob/master/driver/src/test/scala/spec/GraphSpec.scala#L156

I will check it out

Thank you! :)
Matt Hicks
@darkfrog26
no problem...you might even start with that sample code to test everything works for you, and then add an additional collection for your code
elyphas
@elyphas
ok I will do it
elyphas
@elyphas

@darkfrog26; hi, Could You tell me why the error is no captured on the Left side?, please

  def getDetailsRecipe(identity: String): Future[Either[String, (List[ItemRecipe], EventsDoobieResult)]] = {
        val query = aqlu"FOR d IN tblrecipe_details FILTERS d.folio == $identity RETURN d"
        for {        
            _ <- db.init()
            results <- dbExample.query(query).as[ItemRecipe].cursor
        } yield {
            ((results.result.toList, FoundDoobie())).asRight[String]
        }
    }

the error is in the FILTERS word.
but It gives only a () result
I am not using the Graph object because I feel that this way fits more into what I am doing now.
later I'll try Graph :)

Matt Hicks
@darkfrog26
I would recommend testing your queries in the ArangoDB browser query editor before using them in code until you become more proficient.
You want FILTER not FILTERS
elyphas
@elyphas
@darkfrog26 , ah yes
The peoblem i have is the error is not store in the left side of rhe either type
Only know what is happening when is testing the code with scalatest
elyphas
@elyphas
Tomorrow i'll try Try catch
elyphas
@elyphas

@darkfrog26 ; hi, sorry I think I sould know how to handle this situation, but I have troubles to manage the catch for errors.
Would You give me any idea? please

 try {
        val query = aqlu"FOR d IN tblrecipe_details FILTER d.folio == $identity RETURN d"
        for {
            _ <- database.init()
            results <- database.detailsRecipe.query(query).as[ItemRecipe].cursor
        } yield {
            Right(results.result, FoundDoobie())
       }
 } catch {
      case e =>
          Future.successful(Left(e.getMessage + " -- " + e.getLocalizedMessage))
}

it doesn't capture any error, I stop the arangodb daemon to test the conection and also doesn't be capture.

Matt Hicks
@darkfrog26
You need to read up on Future failures
and recover
elyphas
@elyphas
ah thank you
elyphas
@elyphas
now is better with transformWith
:)
elyphas
@elyphas
@darkfrog26 ; Hi, Could You tell me? please, Why this string isn't valid?
val query = aqlu"FOR d IN quitar_tblartic2 SEARCH ANALYZER(d.cve_articulo LIKE '%$txt%', 'text_es') RETURN d"
Matt Hicks
@darkfrog26
that query work in the query browser for ArangoDB?
elyphas
@elyphas
yes
none problem
Matt Hicks
@darkfrog26
ah, the problem is that $txt is a String, so the query can't be evaluated at compile-time
elyphas
@elyphas
yes that's my problem
do I need to concatenate aqlu parts?
Matt Hicks
@darkfrog26
probably, or use the DSL
elyphas
@elyphas
ok thank you
elyphas
@elyphas

@darkfrog26 ; Hi, Could You tell me, please, Why I get this error?:

not found: value LIK
[error]                       LIKE(a.cve_articulo, "%1929%")

in this code:

        val queryDSL = aql {
                      FOR (a) IN database.tblartic 
                      LIKE (a.cve_articulo, "%1929%")
                      RETURN (a)
                  }
Matt Hicks
@darkfrog26
BTW, it occurred to me that your previous problem would have likely been solved by using ... LIKE ${s"%$txt"} ...
I believe in the DSL you're using it wrong. I think it should be a.cve_articulo LIKE "%1929%"
elyphas
@elyphas
:)
Thank you
elyphas
@elyphas

@darkfrog26 ; hi, Could You help me? please.
I have this code:

val queryDSL = aql{
                               FOR (i) IN database.detailsRecipe 
                               FILTER ((i.type_document == item.type_document.getOrElse("")) && (item.fiscal_period == i.fiscal_period) && (i.folio == item.folio))                                                        
                          REMOVE (i) IN database.detailsRecipe 
                      }

but is throwing these errors:

[error]  found   : Boolean
[error]  required: com.outr.arango.query.Filter
[error]                           FILTER ((i.type_document == item.type_document.getOrElse("")) && (item.fiscal_period == i.fiscal_period) && (i.folio == item.folio)) 
[error]                                                                                                                                    ^
[error] /home/elyphas/Prjs/ws_taak/src/main/scala/scarango/CItemRecipeScarango.scala:67:27: not found: value REMOVE
[error]                           REMOVE (i) IN database.detailsRecipe
Matt Hicks
@darkfrog26
try === instead of ==
elyphas
@elyphas
it worked, thank you
elyphas
@elyphas
sorry, but the still I have the error REMOVE
any idea, please,
    FOR (i) IN database.detailsRecipe
    FILTER ((i.type_document === item.type_document.getOrElse("")) && (i.fiscal_period === item.fiscal_period) && (i.folio === item.folio))
   REMOVE (i) IN database.detailsRecipe
not found: value REMOVE
[error]                           REMOVE (i) IN database.detailsRecipe
Matt Hicks
@darkfrog26
@elyphas try updating to 2.4.3 as REMOVE hadn't been added to the DSL. The DSL isn't full-featured, just the functionality I was using.
elyphas
@elyphas
ok, thank you