Giter Club home page Giter Club logo

fib-orm's Introduction

FIBJS - JavaScript on Fiber

    _______ _________ ______  _________ _______ 
   (  ____ \\__   __/(  ___ \ \__    _/(  ____ \
   | (    \/   ) (   | (   ) )   )  (  | (    \/
   | (__       | |   | (__/ /    |  |  | (_____ 
   |  __)      | |   |  __ (     |  |  (_____  )
   | (         | |   | (  \ \    |  |        ) |
   | (_     ___) (___| (___) )/\_)  )  /\____) |
   (__/     \_______/(______/ \____/   \_______)

fibjs is a JavaScript runtime built on Chrome's V8 JavaScript engine. fibjs uses fibers-switch , sync style & non-blocking IO model to build scalable system.

travis build status appveyor build status Join the chat at https://gitter.im/fibjs/fibjs

Get Started

Download

Documentation

Build

Community

If you have any question, please open an issue here

Star History

Star History Chart

fib-orm's People

Contributors

ngot avatar pgilad avatar richardo2016 avatar xicilion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fib-orm's Issues

incompactable to the master version of fibjs

I found the code in repository is right after I wrote the issue, one fix had been in master branch but the code in npm(it's version 1.1.0) is too old, so please update the version of npm package, thx very much : )


after I upgrading to the v0.13.0, fib-orm can not work with the code in README's example. because the result retured by Database.execute is just one NArray type value, and old rs_convert function below is unnecessarry.

// old rs_convert
function rs_convert(r) {
    var r1 = r.toArray();
    r1.insertId = r.insertId;
    r1.affected = r.affected;
    for (var i = 0; i < r1.length; i++)
        r1[i] = r1[i].toJSON();

    return r1;
}

that would made script crashed when one sql executed, and throw one typeError:

TypeError: r.toArray is not a function

Also the toJSON is not one method of item object in r. so r1[i].toJSON() would make one error.

If you think code below is valid and fib-orm is just for the latest fibjs(v0.13.0), maybe you can just replace the old code above with it:

// 1: shorter code
function rs_convert(r) {
    var r1 = Array.prototype.slice(r, 0);
    r1.insertId = r.insertId;
    r1.affected = r.affected;

    return r1;
}

// 2: remove it, because it's unnecessary.

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.