Skip to content

NeotomaDB/Neotoma_SQL

Repository files navigation

Neotoma_SQL

This is a repository to store the functions used within the Neotoma Database for data access and updates. The Neotoma is a Postgres-based system, migrated from a SQL Server database. As such, at the current time, this repository largely reflects the state of transition between the two systems.

Contributors

All individuals are welcome to contribute to this repository. Contributions are subject to the Code of Conduct for this repository.

Description

The repository is divided into two main folders, legacy and function. The legacy folder is intended to act as the store for the now deprecated SQL Server Stored Procedures. The function folder represents the newer Postgres functions. This folder is then divided into folders for each individual database schema.

This structure is not necessary, but has been implemented to help manage the workflow of rewriting the large number of functions associated with the original database.

Maintaining the Repository

This repository is currently intended to be read-only. The stored postgres functions can be updated using the Python3 script connect_remote.py by calling:

python3 connect_remote.py

This program checks the pg_catalog and pulls each function within a defined set of namespaces, and returns each function as its own sql file to a folder in the function directory.

Standards For New Functions

Functions are expected to follow (as much as possible) Simon Holywell's SQL Style Guide and the Postgres Coding Convention.

  • Functions should be generated in standalone files
  • Functions should be named using verbs
  • Functions should refrain from using vendor specific functions
  • Use C style commenting: /* . . . */

Issues and Bugs

Please feel free to raise issues using the issue tracker on this repository.

About

Repository for functions associated with Neotoma's Postgres DB

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors