GithubHelp home page GithubHelp logo

DataStore Sample about elixir-google-api HOT 5 CLOSED

googleapis avatar googleapis commented on July 16, 2024
DataStore Sample

from elixir-google-api.

Comments (5)

noizu avatar noizu commented on July 16, 2024 7

It took me 57 minutes to sleuth that out and I know the language and programming in general pretty well. So for some kid new to Elixir or to walking through other peoples source code that could have taken hours or days to figure out.

If the developer can post some simple examples in the readme and throw a few @examples into the inline exdocs I think it would go a long way for swinging adoption to this library away from the unofficial Diplomat client. Having access to cursors, etc. is a major improvement even if things look a little unnecessary verbose/java like.

https://github.com/christopheradams/elixir_style_guide

but beggars can't be choosers, super glad to have these libraries available now ^_^.

from elixir-google-api.

noizu avatar noizu commented on July 16, 2024 2

For the data store project in this code base it's actually the following.

{:ok, token} = Goth.Token.for_scope("https://www.googleapis.com/auth/datastore")
 conn = GoogleApi.Datastore.V1.Connection.new(token.token)
 request = %GoogleApi.Datastore.V1.Model.RunQueryRequest{
      gqlQuery:  %GoogleApi.Datastore.V1.Model.GqlQuery{
        queryString: "select * from DataStoreEntityType limit 5",
        allowLiterals: true
      }
    }
r = GoogleApi.Datastore.V1.Api.Projects.datastore_projects_run_query(conn, "your-project-name", [body: request])

from elixir-google-api.

bshaffer avatar bshaffer commented on July 16, 2024

https://github.com/GoogleCloudPlatform/elixir-samples/tree/master/datastore !!

https://github.com/GoogleCloudPlatform/elixir-samples/blob/master/datastore/lib/datastore_samples.ex !!

from elixir-google-api.

noizu avatar noizu commented on July 16, 2024

Thanks @bshaffer but those are using the older Diplomat Library which is a fantastic piece of software but lacks support for cursors.

from elixir-google-api.

fhinkel avatar fhinkel commented on July 16, 2024

Greetings, we're closing this due to inactivity. Please let us know if the issue needs to be reopened.

from elixir-google-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.