Giter VIP home page Giter VIP logo

mf2sql's Introduction

mf2sql unlicense

A PostgreSQL (10) schema for storing microformats2 objects (as the canonical JSON representation), featuring:

  • Fast storage and querying (jsonb + GIN)
  • Uniqueness constraint on the first url value
  • Full text search
  • Automatic insert/update/delete notifications
  • Denormalization (embed linked objects like replies for exporting into JSON files or rendering to HTML templates)
  • Normalization (un-embed linked objects when importing from JSON files)
  • And more

Setup

  • Create a database e.g. sudo -u postgres createdb mywebsite
  • Run SELECT current_setting('default_text_search_config'); to check if your default language for full text search matches your website's (if not, change that setting)
  • Run the migrations using migrate e.g. migrate -path=migrations -url=postgres://localhost/mywebsite\?sslmode=disable up (or just run the migrations/*.up.sql files with psql if you don't want to bother with migrate) (so far there's only one migration)
  • Install the functions by running psql on functions/*.sql
  • Import JSON files using import.rb if you want

Development

Grab pgTAP (including pg_prove) to run the tests!

Contributing

Please feel free to submit pull requests!

By participating in this project you agree to follow the Contributor Code of Conduct.

The list of contributors is available on GitHub.

License

This is free and unencumbered software released into the public domain.
For more information, please refer to the UNLICENSE file or unlicense.org.

mf2sql's People

Contributors

valpackett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

aeroglyphic

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.