GithubHelp home page GithubHelp logo

codemanx / arangodb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arangodb/arangodb

0.0 0.0 0.0 537.68 MB

ArangoDB is a multi-purpose, open-source database with flexible data models for documents, graphs, and key-values. Build high performance applications using a convenient SQL-like query language or JavaScript/Ruby extensions. Use ACID transaction if you require them. Scale horizontally and vertically with a few mouse clicks.

Home Page: www.arangodb.org

License: Apache License 2.0

Makefile 0.12% Python 2.45% JavaScript 38.52% CSS 0.92% C++ 54.48% Shell 0.34% C 1.33% Assembly 0.10% Objective-C 0.01% Objective-C++ 0.01% Emacs Lisp 0.01% Lua 0.01% Scheme 0.01% Go 0.70% Perl 0.16% Ruby 0.69% SAS 0.01% CLIPS 0.01% Ada 0.06% Pascal 0.10%

arangodb's People

Contributors

aurelijusb avatar baslr avatar beckmann73 avatar benjamin-martijn avatar codemanx avatar dajester2013 avatar dothebart avatar estebanlombeyda avatar fagnercarvalho avatar fceller avatar frankmayer avatar friday avatar gschwab avatar guidoreina avatar hkernbach avatar jamesarango avatar jsteemann avatar luebbert42 avatar mchacki avatar neunhoef avatar pluma avatar sarasfox avatar sarhugo avatar scottashton avatar stackmagic avatar timoschilling avatar tjfwalker avatar weinberger avatar x4 avatar yojimbo87 avatar

Watchers

 avatar

arangodb's Issues

Discussion: Additional AQL DATE functions

It started out at arangodb#317 (comment), continued in the comments of a gist and is to be continued here.

Implementation status (aql-date-extra branch):

  • DATE_LEAPYEAR(date):

    true if divisible by 4, but not 100, except 400; false otherwise
  • DATE_DAYOFYEAR(date):

    1..365 in a regular year, 1..366 in a leap year
  • DATE_ISOWEEK(date):

    1..53, week date according to ISO8601 (monday=1st day of week, no fractional weeks)
  • DATE_QUARTER(date):

    1..4; Jan/Feb/Mar=1, Apr/May/Jun=2, Jul/Aug/Sep=3, Oct/Nov/Dec=4
  • DATE_ADD(date, amount, unit), DATE_SUBTRACT(date, amount, unit):

    add or subtract a given amount of time units from date. Amount may also be an ISO duration, but unit must then be left out.

    TODO: discuss if mixed-sign ISO durations are useful enough to be added, add support for weeks unit?
  • DATE_DIFF(date1, date2, unit):

    Calculate difference between two dates, in a given time unit, optionally with decimal fraction.

    TODO: Testing (years and months as expected?), assess time unit naming (singular / plural, ms as alternative abbreviation of f?)
  • Additional DATE_*() functions:

    TODO: Assess usefulness of functions like "is birthday", "last day of month/week"...

    Favor generic solutions, so that AQL queries stay semantically meaningful even if the functions are used differently than anticipated. Counter example: DATE_IS_BIRTHDAY(DATE_ADD(date, 7, "days")) to compare month and day (better would be: DATE_PART(), DATE_MATCH() or DATE_COMPARE()). DATE_DAYS_IN_MONTH(date) (28..31)?
  • DATE_COMPARE(date1, date2, unitRangeStart, unitRangeEnd):

    Compare two dates partially, using a range of units (e.g. "months", "hours" to compare months, days and hours, while ignoring years, seconds and ms.

    TODO: Should it handle leap days, because leaplings deserve a birthday party every year, or is it up to the user to handle leap years in combination with birthdays? We could substitute Feb 29th automatically with 28th or March 1st, but it may be undesired for use cases other than birthday checking. It also depends on the local jurisdiction which day is the birthday in non-leap years.
  • DATE_FORMAT(date, format):

    Format a date according to format string.
  • TODO: Use LRU cache for ISO durations to limit the maximum number of cache entries.

    The current cache object never goes out of scope (as far as I understand), and the cache will thus grow unbounded. This is a problem in server-side JS, because the server may run for a year straight. But it's also a security risk, because an attacker can easily make the server claim a lot of memory without releasing it again (memory leak), until the server or other processes crash as the system runs out of memory.
    Cache is cleared on every AQL query thanks to Jan.
  • TODO: Couple more unit tests.
  • Acknowledgements

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.