Giter Site home page Giter Site logo

ifeanyiokagbue / everly Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 14 KB

Everly is an SQL Server Stored Procedure that enables one to perform any CRUD operation on a database, manages audit trail and even helps to reverse an operation done using it. Simply put, with everly, you use only one stored procedure to insert/update/delete/fetch from any table in your database and it will even manage audit trail for you.

License: MIT License

TSQL 100.00%
sql sql-server stored-procedure

everly's Introduction

Everly

Everly is an SQL Server Stored Procedure that enables one to perform any CRUD operation on a database, manages audit trail and even helps to reverse an operation done using it.

Requirements

Everly requires two scripts everly-prerequisites.sql and everly.sql. The former contains four user-defined functions which are:

  1. Fetch_ReturnCommaSeparatedString - This is used to get values from a comma seperated string using the index.
  2. IsValueValid - This is used to check that the value of a parameter is valid comparing it with the datatype of the column to use it.
  3. IsValuesValid - This is used to check that all the parameters passed are valid. It loops through each of the value using IsValueValid for each of the parameter
  4. IsValuesValid_Description - This is used to get the details of the columns that didn't pass the validation

While the latter contains the Everly stored procedure.

How to use Everly

Everly requires four parameters namely @Action for INSERT/UPDATE/DELETE/FETCH, @ColumnValues for values to be inserted or updated into columns, @TableName for Table to be modified and @Condition for the condition for an update or delete action

Examples on How to use Everly

For a table called Banks which has columns BankID int, BankName varchar(50), CreatedBy int and DateCreated datetime, everly can be used to perform CRUD operations with the following queries.

Everly 'FETCH','','Banks',''

Everly 'INSERT','"WALLY","WALLY BANK",1,GETDATE()','Banks',''

Everly 'UPDATE','"WALLY","WALLY BANK",1,GETDATE()','Banks','BankID=1028'

Everly 'DELETE','','Banks','BankID=1027'

Finally, if you have done any action in error like UPDATE/DELETE/INSERT you can simply reverse it using Everly like this: Everly 'REVERSE'

Feel free to make contributions.

Updates coming very soon....

everly's People

Contributors

ifeanyiokagbue avatar

Stargazers

 avatar

Watchers

 avatar

everly's Issues

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.