Giter Site home page Giter Site logo

fulcro-rad-xtdb's Introduction

XTDB Database Plugin

Note Crux database has been renamed to XTDB (see crux → xtdb migration guide).

fulcro rad xtdb

This is a plugin for Fulcro RAD that adds support for using xtdb (formely known as Crux) databases as the back-end technology.

This repo bases on fulcrologic/fulcro-rad-datomic adapted to xtdb api with some Datomic specific features dropped (e.g. schemas and Datomic Cloud support).

Status

It’s a very first alpha iteration - it passes integration test and seems to be working properly with roterski/fulcro-rad-demo but has not been tested outside of it yet.

Configuration

There is an example application roterski/fulcro-rad-demo that can be referenced for how to properly configure this plugin.

xtdb-adapter/start-databases expects a map with :roterski.fulcro.rad.database-adapters.xtdb/databases key that contains configuration maps for each defined database. Configuration maps are then passed directly to xtdb.api/start-node so please refer to xtdb documentation for available options.

:roterski.fulcro.rad.database-adapters.xtdb/databases
    {:main {:xtdb.jdbc/connection-pool {:dialect #:xtdb{:module "xtdb.jdbc.psql/->dialect"}
                                        :db-spec {:dbname   "fulcro-rad-demo"
                                                             :user     "postgres"
                                                             :password "postgres"}}
            :xtdb/tx-log               {:xtdb/module "xtdb.jdbc/->tx-log"
                                        :connection-pool :xtdb.jdbc/connection-pool}
            :xtdb/document-store       {:xtdb/module "xtdb.jdbc/->document-store"
                                        :connection-pool :xtdb.jdbc/connection-pool}}}

Because xtdb expects module names to be symbols, there’s a convenience function xtdb-adapter/symbolize-xtdb-modules that symbolizes values under :xtdb/module so you can store them as strings in edn file.

(require '[roterski.fulcro.rad.database-adapters.xtdb :as xtdb])

(xtdb/start-databases (xtdb/symbolize-xtdb-modules config))

LICENSE

The MIT License (MIT) Copyright (c), Fulcrologic, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

fulcro-rad-xtdb's People

Contributors

awkay avatar currentoor avatar gpellis avatar roterski avatar thosmos avatar tylernisonoff avatar zilti avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fulcro-rad-xtdb's Issues

Move wrap-env from pathom3 demo into xtdb. Remove pathom2 dependency.

Hi there.

I've released new versions of all of the RAD stuff, and made a pathom3 branch on the demo. I did the porting work there for xtdb (you'll see a new wrap-env in the parser ns). It would be good to move that function into your library, instead of it just being in the demo.

Also, you should try to remove all references to Pathom 2 in your library. This should be trivial (I did it already in the RAD datomic plugin and in RAD itself), and is backwards compatible. Pathom 2 plugins, resolvers, and mutations are just maps, so all I had to do was turn any calls to defmutation/defresolver into defs of maps. Just use a REPL to view them when running with Pathom 2. You have to, of course, manually spell out the full pathom 2 namespaces on the keywords.

This will allow people to only have one version of Pathom on the classpath, which will confuse them less when using autocomplete, etc.

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.