GithubHelp home page GithubHelp logo

Postgres .find doesn't work about jugglingdb HOT 2 CLOSED

1602 avatar 1602 commented on July 18, 2024
Postgres .find doesn't work

from jugglingdb.

Comments (2)

1602 avatar 1602 commented on July 18, 2024

Model.find is for searching by id, Model.all - for querying collection,
Model.findOne - querying single record. Check api docs for abstract-class
at makedoc.node-js.ru

On Tue, Apr 3, 2012 at 1:15 AM, kcsobo <
[email protected]

wrote:

Using any of my models, I can use findOne but not find.

Example:

#define
User = pg_db.define('User', {
name: { type: String, length: 255 }
username: { type: String, length: 255 }
token: { type: String, length: 255 }
email: { type: String, length: 255 }
}, {table: 'users'})

User.find {where: {name: 'name'}},(err,users)->
if err?
console.log err

Gives me:

{ [error: syntax error at or near "["]
length: 83,
name: 'error',
severity: 'ERROR',
code: '42601',
detail: undefined,
hint: undefined,
position: '46',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
file: 'scan.l',
line: '1001',
routine: 'scanner_yyerror' }


Reply to this email directly or view it on GitHub:
#55

Thanks,
Anatoliy Chakkaev

from jugglingdb.

fiestacasey avatar fiestacasey commented on July 18, 2024

awesome. thank you for pointing me in the right direction.

from jugglingdb.

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.