GithubHelp home page GithubHelp logo

wolframresearch / mongolink Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 5.0 1.45 MB

MongoLink is a package for interacting with MongoDB inside the Wolfram Language.

License: Apache License 2.0

Mathematica 75.32% C++ 24.68%
driver mathematica mongodb mongolink wolfram-language

mongolink's People

Contributors

meghanrw avatar sbodenstein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongolink's Issues

ToMillisecondUnixTime truncates milliseconds of DateObject[]'s

ToMillisecondUnixTime[] truncates milliseconds when it converts DateObject[]'s to milliseconds from epoch. As a result, you can't perform sub-second date/time queries. That prevents efficiently finding records in the case where you might be looking for records in a 20ms window where you have records stored at 100 Hz. As a result of the truncation, you'd have to retrieve all ~100 records and find the subset within the window.

Need a fix along the lines in ACommon.m:

ToMillisecondUnixTime[date_DateObject] := Module[
	{sec,msec},
	msec = date["Millisecond"];
	If[MissingQ[msec], msec = 0, msec *= 10];
	sec = date["Second"];
	If[MissingQ[sec], sec = 0];
	1000 * UnixTime[date] + msec
]

Additionally, it appears that on my Mac OS system, that DateObject[...]["Millisecond"] reports hundredths of seconds instead of milliseconds. I do not know how widespread that is and how one would detect it (maybe that's why this it's truncated?).

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.