Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michael-rubel/laravel-sql-function-repository
Repository class to run SQL functions available in the PostgreSQL database
https://github.com/michael-rubel/laravel-sql-function-repository
database functions laravel looking-for-contributors mariadb mssqlserver mysql php postgresql sql sql-functions sqlite
Last synced: about 2 months ago
JSON representation
Repository class to run SQL functions available in the PostgreSQL database
- Host: GitHub
- URL: https://github.com/michael-rubel/laravel-sql-function-repository
- Owner: michael-rubel
- License: mit
- Archived: true
- Created: 2022-05-26T08:11:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-19T12:02:15.000Z (almost 2 years ago)
- Last Synced: 2024-09-25T18:53:08.634Z (about 2 months ago)
- Topics: database, functions, laravel, looking-for-contributors, mariadb, mssqlserver, mysql, php, postgresql, sql, sql-functions, sqlite
- Language: PHP
- Homepage:
- Size: 44.9 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
![Run database function](https://user-images.githubusercontent.com/37669560/176688279-9cae459f-d758-453a-80c1-cf1b345f9cc4.png)
# Laravel SQL Function Repository
[![Latest Version on Packagist](https://img.shields.io/packagist/v/michael-rubel/laravel-sql-function-repository.svg?style=flat-square&logo=packagist)](https://packagist.org/packages/michael-rubel/laravel-sql-function-repository)
[![Total Downloads](https://img.shields.io/packagist/dt/michael-rubel/laravel-sql-function-repository.svg?style=flat-square&logo=packagist)](https://packagist.org/packages/michael-rubel/laravel-sql-function-repository)
[![Code Quality](https://img.shields.io/scrutinizer/quality/g/michael-rubel/laravel-sql-function-repository.svg?style=flat-square&logo=scrutinizer)](https://scrutinizer-ci.com/g/michael-rubel/laravel-sql-function-repository/?branch=main)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/michael-rubel/laravel-sql-function-repository.svg?style=flat-square&logo=scrutinizer)](https://scrutinizer-ci.com/g/michael-rubel/laravel-sql-function-repository/?branch=main)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/michael-rubel/laravel-sql-function-repository/run-tests.yml?branch=main&style=flat-square&label=tests&logo=github)](https://github.com/michael-rubel/laravel-sql-function-repository/actions)
[![PHPStan](https://img.shields.io/github/actions/workflow/status/michael-rubel/laravel-sql-function-repository/phpstan.yml?branch=main&style=flat-square&label=larastan&logo=laravel)](https://github.com/michael-rubel/laravel-sql-function-repository/actions)This package provides a repository class to run SQL functions available in the database.
Currently, only `PostgreSQL` database is supported, but if you want to add support for your database, contributions are welcomed.---
The package requires `PHP 8` or higher and `Laravel 9` or higher.
## #StandWithUkraine
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)## Installation
Install the package using composer:
```bash
composer require michael-rubel/laravel-sql-function-repository
```Publish the config, set up basic connection and select:
```bash
php artisan vendor:publish --tag="sql-function-repository-config"
```## Usage
```php
$repository = app(SqlFunctionRepository::class);
$repository->runDatabaseFunction('yourFunctionName', [
'functionParameter1',
'functionParameter2',
]);
```## Testing
```bash
composer test
```## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.