Giter Site home page Giter Site logo

Create a about nodem HOT 1 CLOSED

dlwicksell avatar dlwicksell commented on May 31, 2024
Create a

from nodem.

Comments (1)

dlwicksell avatar dlwicksell commented on May 31, 2024

Bhaskar,

NodeM actually does have example programs, and they can be run quickly to determine if NodeM was successfully installed and set up. Using them for that purpose, they may not handle errors as well as they should, something I will improve over time, but they should provide a good spot check on whether NodeM is set up and working.

So there are two example JavaScript programs, both located in the examples/ directory. One, called set.js will test the set API, and providing some performance metrics. Here is some info on how it can be called, but it has defaults if you just invoke it as node examples/set.js.

Store nodes of data in the database (^v4wTest) or symbol table (test), while providing performance timing information. Pass, in any order, the string 'global' or 'local' to test storing in to the database, or local symbol table. Pass, in any order, the number of nodes you want to store data in to.

Also, this program cleans up after itself, by killing the global nodes it writes to (in my own name spaced global, ^v4wTest) after it has finished.

The other example program is called zwrite.js. It is a JavaScript implementation of the ZWRITE command, but is limited to dumping the data of a whole global only, at this time. It actually also provides a much faster wrapper around an actual ZWRITE dump, as it can be a useful way for me to confirm that NodeM is working correctly with data. Here is some info on how it can be called, and again, it has defaults if you just invoke it as node examples/zwrite.js, although in this case, it dumps a test global that you likely would not have any data in. So for this one to be more useful to you, you'd probably want to pass an argument to it.

Dumps the contents of a full global in a similar format to the zwrite command in YottaDB/Gt.M. Pass the name of the global you want to dump, or don't pass any argument and it will use a default of ^v4wTest. You can optionally supply the following arguments, in any order, before or after the global name.

-f [fast mode] - - Creates a temporary GT.M routine and calls into the
routine (which will also dump the entire contents of the global), and then
cleans up after itself. Calling it this way will execute much faster than
the default JavaScript implementation.

-m [data mode] - |strict - The operating mode, which controls the way
data is formatted, and a few other aspects of the API. Strict mode follows
the cache.node API as closely as possible, including treating all data as
a string.

-c [character set encoding] - |m - The character encoding of the data

-d [debug mode] - - Turns on debug mode, which provides debug tracing data

I hope that helps. Let me know if this is enough to close this issue for you. Thank you!

from nodem.

Related Issues (13)

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.