Jonkman Microblog
  • Login
Show Navigation
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Don Romano (alt) (thor@noagendasocial.com)'s status on Thursday, 09-May-2019 14:26:49 EDT Don Romano (alt) Don Romano (alt)

    Fun fact: You can convert JavaScript arrow functions to strings and extract the AST (abstract syntax tree) using JSEP.

    Suppose you made an ORM that worked like this:

    const s = entity
    .filter(r => r.id == 9)
    .map(r => r.id + 1)
    let res = await s.execute()

    The execute() function would pick apart the chain, convert filter() to an SQL WHERE clause and map() to a SELECT statement and combine them into:

    SELECT id + 1 FROM entity WHERE entity.id = 9

    Example screenshot from Node REPL:

    In conversation Thursday, 09-May-2019 14:26:49 EDT from noagendasocial.com permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Jonkman Microblog is a social network, courtesy of SOBAC Microcomputer Services. It runs on GNU social, version 1.2.0-beta5, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Jonkman Microblog content and data are available under the Creative Commons Attribution 3.0 license.

Switch to desktop site layout.