profile
viewpoint

marcelotomazini/syxth 1

Syxth Eclipse plugin to detect dead code

marrony/bison-flex 1

Simple calculator using bison+flex

marrony/elm-brainfuck 1

Visual Brainfuck interpreter written in Elm Programming Language

cachiconato/diarias-poa 0

change me later

marrony/1pass 0

A command line interface for 1Password

marrony/android_external_skia 0

Skia for Android (CyanogenMod)

Pull request review commentfauna/faunadb-js

DRV-369: get rid of util nodejs package

 'use strict' +/**+ * Inherit the prototype methods from one constructor into another.+ * @param {function} ctor Constructor function which needs to inherit the prototype.+ * @param {function} superCtor Constructor function to inherit prototype from.+ * @private+ */+function inherits(ctor, superCtor) {

Added link to polyfill repo

tigger9flow

comment created time in 2 hours

Pull request review commentfauna/faunadb-js

DRV-369: get rid of util nodejs package

 'use strict' +/**+ * Inherit the prototype methods from one constructor into another.+ * @param {function} ctor Constructor function which needs to inherit the prototype.+ * @param {function} superCtor Constructor function to inherit prototype from.+ * @private+ */+function inherits(ctor, superCtor) {+  if (ctor === undefined || ctor === null) {+    throw new TypeError(+      'The constructor to "inherits" must not be ' + 'null or undefined'

Thanks for pointing, removed unnecessary concatenation

tigger9flow

comment created time in 2 hours

push eventfauna/faunadb-js

Artyom Kurnikov

commit sha 630317d5063007061d12428347a000cd781d4401

DRV-369: get rid of util nodejs package

view details

push time in 2 hours

Pull request review commentfauna/faunadb-js

DRV-369: get rid of util nodejs package

 'use strict' +/**+ * Inherit the prototype methods from one constructor into another.+ * @param {function} ctor Constructor function which needs to inherit the prototype.+ * @param {function} superCtor Constructor function to inherit prototype from.+ * @private+ */+function inherits(ctor, superCtor) {

Was this polyfill copied from somewhere? If so, could you add a link to it in the function docs?

tigger9flow

comment created time in 4 hours

Pull request review commentfauna/faunadb-js

DRV-369: get rid of util nodejs package

 'use strict' +/**+ * Inherit the prototype methods from one constructor into another.+ * @param {function} ctor Constructor function which needs to inherit the prototype.+ * @param {function} superCtor Constructor function to inherit prototype from.+ * @private+ */+function inherits(ctor, superCtor) {+  if (ctor === undefined || ctor === null) {+    throw new TypeError(+      'The constructor to "inherits" must not be ' + 'null or undefined'

(there's two more occurrences bellow)

tigger9flow

comment created time in 4 hours

Pull request review commentfauna/faunadb-js

DRV-369: get rid of util nodejs package

 'use strict' +/**+ * Inherit the prototype methods from one constructor into another.+ * @param {function} ctor Constructor function which needs to inherit the prototype.+ * @param {function} superCtor Constructor function to inherit prototype from.+ * @private+ */+function inherits(ctor, superCtor) {+  if (ctor === undefined || ctor === null) {+    throw new TypeError(+      'The constructor to "inherits" must not be ' + 'null or undefined'

What's the reason for the concatenation here?

tigger9flow

comment created time in 4 hours

Pull request review commentfauna/faunadb-js

Fix for stringification to FQL which inserted nulls for zero-argument AND expose toFQL

 var exprToString = function(expr, caller) {   var fn = keys[0]   fn = convertToCamelCase(fn) -  var args = keys.map(function(k) {+  var args = []++  keys.forEach(function(k) {

I would probably, do it as: keys .filter(function(k) { return expr[k] !== null }) .map(function(k) { return exprToString(v, fn) }) but it can be a matter of preference anyway.

fauna-brecht

comment created time in 6 hours

issue closedfauna/faunadb-csharp

EF Core support

I would like to know whether there would ever be a faunadb extension for EFcore since it's one of the main ways that people manipulate databases in .Net

closed time in 6 hours

Dedigraz

issue commentfauna/faunadb-csharp

EF Core support

Hi @Dedigraz, this is something we've discussed putting on our roadmap in the future. Please feel free to post this request in our Forums' "feature request" category https://forums.fauna.com/c/feature-requests/2

Dedigraz

comment created time in 8 hours

PR opened fauna/faunadb-js

Reviewers
DRV-369: get rid of util nodejs package

Notes

Jira Ticket NodeJS util package has been used for .inherits and .inspect functions. Current implementation supposes polyfilling .inherits function by created one in src/_util.js and optionally using .inspect only when we're running on NodeJS environment

How to test

No features / fixes have been introduced. Can be tested regression-wise

+44 -5

0 comment

4 changed files

pr created time in 10 hours

create barnchfauna/faunadb-js

branch : DRV-369/get-rid-of-util-package

created branch time in 11 hours

issue openedfauna/faunadb-csharp

EF Core support

I would like to know whether there would ever be a faunadb extension for EFcore since it's one of the main ways that people manipulate databases in .Net

created time in 15 hours

startedstefan-hoeck/idris2-elab-util

started time in 2 days

startedstefan-hoeck/idris2-sop

started time in 2 days

pull request commentfauna/faunadb-js

Fix FaunaDate test to ignore timezone

@erickpintor here is where FaunaTime transforms Date instance to iso string. so here is what i get

new Date(1970, 0, 1).toISOString()
"1969-12-31T21:00:00.000Z"
fireridlle

comment created time in 3 days

pull request commentfauna/faunadb-js

Fix FaunaDate test to ignore timezone

I'm surprised to see this test failing now since we've had folks in different timezones workin on the JS driver before. Do we know which part of the driver is rendering the wrong timezone? I don't oppose the fix. I'm just wondering what's the root cause.

fireridlle

comment created time in 3 days

PR opened fauna/faunadb-js

DRV-376 Fix request timeout

Notes

Jira Ticket Current driver pass a 60 seconds timeout down to the cross-fetch polyfill. However, neither whatwg-fetch of node-fetch are aware of it. They both support abort signals, though: https://github.com/node-fetch/node-fetch#request-cancellation-with-abortsignal.

Screenshots

image

+50 -12

0 comment

2 changed files

pr created time in 3 days

PR opened fauna/faunadb-js

Fix FaunaDate test to ignore timezone

Notes

Test "Values › date" doesn't respect timezone

Actual result

Values › date

    expect(received).toEqual(expected) // deep equality

    Expected: "{\"@date\":\"1970-01-01\"}"
    Received: "{\"@date\":\"1969-12-31\"}"

      86 |     var test_date = new FaunaDate(new Date(1970, 0, 1))
      87 |     var test_date_json = '{"@date":"1970-01-01"}'
    > 88 |     expect(json.toJSON(test_date)).toEqual(test_date_json)
         |                                    ^
      89 |     expect(json.parseJSON(test_date_json)).toEqual(test_date)
      90 |   })
      91 | 

      at Object.test (test/values.test.js:88:36)

Expected result

Test should be passed

How to test

jest --env=node --verbose=false ./test/values.test.js 
+1 -1

0 comment

1 changed file

pr created time in 4 days

issue commentfauna/faunadb-js

Unable to import into Cloudflare Workers

Sorry about that! I meant reverting back the faunadb package to 3.0.0.

step135

comment created time in 5 days

startedfoambubble/foam

started time in 5 days

issue commentfauna/faunadb-js

Unable to import into Cloudflare Workers

In my case, after switching back to npm 3.0.0 the wrangler-cli can't even execute publish anymore. @jessepmason what OS are you on? Is it really npm v. 3 that works for you?

step135

comment created time in 5 days

delete branch fauna/faunadb-js

delete branch : fix-parser

delete time in 7 days

push eventfauna/faunadb-js

Erick Pintor

commit sha 06777483a2f0d4e8627b50fd01b54df4883c72aa

switch from contatenated to line-separated JSON

view details

Erick Pintor

commit sha 2e64c305d0a84eb10ee7b3e9e06ac857c97fc7a1

Merge pull request #373 from fauna/fix-parser ENG-2431: Switch from contatenated to line-separated JSON

view details

push time in 7 days

PR merged fauna/faunadb-js

Reviewers
ENG-2431: Switch from contatenated to line-separated JSON

Notes

To support for large JSON documents, we're moving from concatenated JSON objects to line-separated JSON streaming. This fix is intended to be backwards compatible while supporting the new line-separated format that is coming to cloud soon.

How to test

With a recent nightly build:

  • Create a document;
  • Open a stream for it;
  • Issue an updated with a relatively large JSON document (about 4KB or more).

Without this fix, the JSON parsing on the received version should break. With this path, you shall receive the updated version normally as part of the document stream.

We should release this fix once ENG-2431 is in cloud.

+85 -33

0 comment

4 changed files

erickpintor

pr closed time in 7 days

startedliuxinyu95/unplugged

started time in 8 days

issue commentfauna/faunadb-python

Example Documentation for Lambdas

@faunaee Hi Ewan, thanks for your reply. Let's say I wanted to bulk create records. I attempted a loop create:

# for row in data:
    #     result = client.query(
    #         q.create(
    #             q.collection(collection_name),
    #             {
    #                 "data": row
    #             }
    #         )
    #     )

This worked, but for 100000 rows - is completely impractical. I'm perhaps bending FaunaDB to our whim, but how could a Lambda() work for this scenario? We have q.lamda_ but also pythons inbuilt lambda expressions...which do we use when and where? It's just not clear.

@asencis When reading data from a collection or index you can use the built in lambda function as below.

data = client.query( 
              # Maps over an array or FQL page and calls an expression/lambda on each item.
              # In this case, we are calling q.get on each item returned from the 2nd parameter’s q.paginate.
               q.map_(
                   # q.get takes a document’s Ref and retrieves the entire document.
                   # Refs are similar to primary/foreign keys and serve as unique pointers to documents.
                   # q.index returns the Ref for an index. Note that all entities in FaunaDB are documents and have Refs.
                   # q.match takes the ref of an index, along with search parameters, and returns something called a SetRef.
                   # Finally, q.paginate takes a SetRef and returns a page with iterable data.
                   lambda x: q.get(x),
                   q.paginate(q.match(
                       q.index("products_by_category"), category)))   
                   )

asencis

comment created time in 9 days

issue closedfauna/faunadb-csharp

[C#] Decoding of custom type in array returns NULL values

I have created a custom type called User, which utilises the FaunaField reflection method for specifying properties of the objects.

Please provide more information on how to decode arrays of custom types, as this id poorly described in your documentation for the C# driver.

The problem can be repreduced from the following example.

Example:

public class User
    {
        [FaunaField("id")]
        public string Id { get; set; }
        [FaunaField("name")]
        public string Name { get; set; }
        ...
    } 

I then created a mutation for creating a new document in my 'user' collection, which works fine, and returns the expected result.

Example:

var result = await _fauna.client.Query(
                    Create(
                        Collection("user"),
                        Obj("data", Encoder.Encode(upsertUser))));
                
return Decoder.Decode<User>(result.At("data"));

Now my issue is retrieving the full list of user documents in my 'users' collection. I verified that i retrieve all the right data, but once i decode the data with Decoder.Decode or <<....>>.To<User[]>() i get NULL values.

Example:

public async Task<User[]> GetUser()
        {
            var result = await _fauna.client.Query(
                Map(
                    Paginate(
                        Documents(Collection("user"))), 
                    Lambda("X", Get(Var("X")))));
            
            var userResult = result.At("data").To<User[]>().Value;

            return userResult;
        }

Raw Output:

Arr(
  ObjectV(
    ref: RefV(id = "286263727644213761", 
    collection = RefV(id = "user", collection = RefV(id = "collections"))),
    ts: LongV(1609261214770000),
    data: ObjectV(id: StringV(d9853632-7b8f-42d1-b217-eb314e58d417),
      name: StringV(Test User),
      email: StringV(sample@domain.email),
  ObjectV(
    ref: RefV(id = "286263756128780801", 
    collection = RefV(id = "user", collection = RefV(id = "collections"))),
    ts: LongV(1609261241940000),
    data: ObjectV(id: StringV(56a06ea3-ef0b-4ded-a627-ceab63385fe2),
      name: StringV(Test User),
      email: StringV(sample@domain.email),
    )
)

Decoded Output:

{
  "data": {
    "user": [
      {
        "id": null,
        "name": null,
        "email": null,
        "access": null
      },
      {
        "id": null,
        "name": null,
        "email": null,
        "access": null
      }
    ]
  }
}

Expected Output:

{
  "data": {
    "user": [
      {
        "id": "Sample ID",
        "name": "Sample Name",
        "email": "Sample Email",
      },
      {
        "id": "Sample ID",
        "name": "Sample Name",
        "email": "Sample Email",
      }
    ]
  }
}

closed time in 11 days

CTxD

issue commentfauna/faunadb-csharp

[C#] Decoding of custom type in array returns NULL values

@marrony - thanks for the quick response! Works as expected.

CTxD

comment created time in 11 days

startedmeraymond2/idris-vscode

started time in 11 days

startedidris-community/idris2-lsp

started time in 12 days

more