profile
viewpoint

evbruno/akka-camel-oaq-example 4

Scala + Akka + Camel + OAQ (Oracle Advanced Queuing) code sample

evbruno/agatetepe 2

Yet another simple HTTP Client for Scala

evbruno/9stepsawesome 0

The exercises/samples repo for bit.ly/9stepsawesome presentation

evbruno/activate 0

Pluggable object persistence in Scala

evbruno/brew 0

🍺 The missing package manager for macOS (or Linux)

evbruno/brotodevbox 0

A virtual machine with a Ruby development environment

evbruno/coursera-android 0

Source Code for Android Course Example Applications

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

PR opened fauna/vscode

DRV-390 Can’t run multi line queries

The issue here that the plugin support executing multiple queries by writing query per line or separate them using ; https://github.com/fauna/vscode/blob/master/src/fql.ts#L226

The fix is to remove \n as a query separator. the plugin still able to handle multiple queries with ; for example

Paginate(
  Collections()
);
Paginate(Indexes())
+4 -3

0 comment

1 changed file

pr created time in 5 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 7 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

startedsasa1977/ci

started time in 3 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

pull request commentfauna/faunadb-go

DRV-368: Added support for omitempty field tag

I added a WIP of sucessfully decoding omitempty structs.

This however caused another test to fail:

TestRunClientTests/TestEvalCountMeanSumExpression

Probably need someone with more intricate knowledge of the FQL language and serialization/deserialization to finish and fix this

mscno

comment created time in 4 days

PR opened fauna/vscode

fix: split queries properly

This PR allows a single query to span many lines, but multiple queries at once are still possible.

The parser is pretty simple. It looks for opening and closing parens/braces to know when a query ends. It also handles quote characters (" and ') to avoid false positives.

Test plan

const tests = [
  // One query on many lines
  `A(B("'", {
     c: C() 
   }))`,
  // Many queries on many lines
  `A(
    B('{'),
    {}
   )
   C()
   D()`,
  // Top-level object
  `{
     a: A(),
     b: B()
   }`
]

tests.forEach(code => {
  console.log('in:  %O', code)
  console.log('out: %O', splitQueries(code))
})
+39 -9

0 comment

1 changed file

pr created time in 4 days

pull request commentfauna/faunadb-go

DRV-368: Added support for omitempty field tag

tests and fixes for deserialization still needed, will get that one of the next days

mscno

comment created time in 4 days

issue commentfauna/faunadb-go

Fauna-go should ignore zero values when serializing/saving

Update: Option 1 above doesnt work either, as a pointer string field with nil value, will override and delete any existing data in the field, possibly causing unintended dataloss:

Example:

//Struct
	person := &Person{
		Name:  &name,
		Email: &email,
	}

	personObj := f.Obj{"data":&person}a
	fmt.Println(personObj.String())
  // prints: 'Obj{"data": Obj{"Name": "John Doe", "Email": "somemail@mail.com"}}'


	newEmail := "newemail@mail.com"
	personEmailOnly := &Person{
		Email:  &newEmail,
	}
	personEmailOnlyObj := f.Obj{"data":&personEmailOnly}

	fmt.Println(personEmailOnlyObj.String())
  // prints: 'Obj{"data": Obj{"Name": nil, "Email": "newemail@mail.com"}}'


	res, err := s.fdb.Query(f.Create(f.Collection("persons"),personObj))
	if err != nil {
		return err
	}
	var personRef f.RefV
	_ = res.At(ref).Get(&personRef)

	res, err = s.fdb.Query(f.Update(personRef,personEmailOnlyObj))
	if err != nil {
		return err
	}
	newPerson := Person{}
	res.At(data).Get(&newPerson)

	fmt.Println("name:",newPerson.Name," | email: ",newPerson.Email)
  // prints: 'name: <nil>  | email:  0xc013cf2480
'

In the above case, we create a person with both email and name. Then afterwards we update the persons email, having a struct that has "nil" at the Name field. This causes as the resulting value in the name field in the database to be deleted.

mscno

comment created time in 4 days

issue commentfauna/faunadb-go

Fauna-go should ignore zero values when serializing/saving

Update: Option 1 above doesnt work either, as a pointer string field with nil value, will override and delete any existing data in the field, possibly causing unintended dataloss:

Example:

//Struct
	person := &Person{
		Name:  &name,
		Email: &email,
	}

	personObj := f.Obj{"data":&person}
	fmt.Println(personObj.String())

	newEmail := "newemail@mail.com"
	personEmailOnly := &Person{
		Email:  &newEmail,
	}
	personEmailOnlyObj := f.Obj{"data":&personEmailOnly}

	fmt.Println(personEmailOnlyObj.String())


	res, err := s.fdb.Query(f.Create(f.Collection("persons"),personObj))
	if err != nil {
		return err
	}
	var personRef f.RefV
	_ = res.At(ref).Get(&personRef)

	res, err = s.fdb.Query(f.Update(personRef,personEmailOnlyObj))
	if err != nil {
		return err
	}
	newPerson := Person{}
	res.At(data).Get(&newPerson)

	fmt.Println("name:",newPerson.Name," | email: ",newPerson.Email)

In the above case, we create a person with both email and name. Then afterwards we update the persons email, having a struct that has "nil" at the Name field. This causes as the resulting value in the name field in the database to be deleted.

mscno

comment created time in 4 days

issue commentfauna/faunadb-go

Fauna-go should ignore zero values when serializing/saving

Another update on this issue, with details on a use case where pointers are not preferable is when updating existing structs:

Say I have a struct as follows

type Person struct {
	Email string `fauna:"email"`
	Name int `fauna:"name"`
}

Lets say I have strictly ensured that these columns are never null, and therefore I prefer to treat them as strings rather than pointers

Now I want to update a struct and change the email of a person. For example because I received a put request from the user. If this put object contained only the email, I would do the following:

If I pass in the customer struct like so:

myPerson := Person{Email: newEmail}

res, err := faunaClient.Query(f.Update(ref,&myPerson))

this would cause the Name field in the database to be overwritten with "", which is not I what I want.

Now am stuck with two options:

  1. model the fields as nullable, even though they are not nullable and never have zero values. Which causes we to introduce unnecessary nil checks in the rest of the code.
  2. manually create the FQL query for only updated a subset of the fields. This might be easy for the above struct, but imagine a large struct with hundreds of fields and nested objects where I only want to up date a single field, then it would be a tedious proces..

Implementing omitempty option elegantly solves this by never serializing and transmitting values that have zero values.

mscno

comment created time in 5 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

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

push eventn400/awesome-faunadb

Summer Schrader

commit sha d8d1603315e159ecb3fac3109f4d1d403edabbc3

Update README.md

view details

push time in 6 days

push eventn400/awesome-faunadb

Tom Doe

commit sha 1b1383e383eea59e75a409f2ff67298fbd322571

Added a tutorial I wrote Added tutorial: "Build a serverless recipes app with FaunaDB and Vue.js"

view details

Tom Doe

commit sha a923d4ca298d42f02adf89f821a37b076bb62042

Merge pull request #1 from ttntm/ttntm-article Added a tutorial I wrote

view details

Summer Schrader

commit sha e31b2b5693bac300a306dd46b7cd1ead39e7ed7f

Merge branch 'master' into master

view details

Summer Schrader

commit sha c17c9dbf813bd1051a947947c648f0ca495e822b

Merge pull request #7 from ttntm/master Added a tutorial article I wrote for FaunaDB

view details

push time in 6 days

PR merged n400/awesome-faunadb

Added a tutorial article I wrote for FaunaDB

"How I built a serverless recipes app with FaunaDB and Vue.js" from https://ttntm.me/blog/serverless-recipes-app-faunadb-vuejs

+2 -1

0 comment

1 changed file

ttntm

pr closed time in 6 days

delete branch fauna/faunadb-js

delete branch : fix-parser

delete time in 7 days

more