Skip to content

Instantly share code, notes, and snippets.

View prashant4224's full-sized avatar
🏠
Working From Home

Prashant Jeerankalagi prashant4224

🏠
Working From Home
View GitHub Profile
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetUser`()
BEGIN
SELECT * FROM USER ORDER BY FIRST_NAME;
END
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetUser`()
BEGIN
SELECT * FROM USER ORDER BY FIRST_NAME;
END
CREATE PROCEDURE `GetByCity`(IN cityName varchar(255))
BEGIN
select * from user where city=cityName;
END
//call test_db.GetByCity('Pune');
CREATE PROCEDURE `GetCityCountByName`(IN cityName varchar(255), OUT total INT)
BEGIN
select COUNT(*) into total from user where city=cityName;
END
//call test_db.GetCityCountByName('Belagavi', @total);
//select @total;
DELIMITER $$
CREATE PROCEDURE GetCustomerLevel(
IN pCustomerNumber INT,
OUT pCustomerLevel VARCHAR(20))
BEGIN
DECLARE credit DECIMAL(10,2) DEFAULT 0;
SELECT creditLimit
INTO credit
DELIMITER $$
CREATE PROCEDURE GetDeliveryStatus(
IN pOrderNumber INT,
OUT pDeliveryStatus VARCHAR(100)
)
BEGIN
DECLARE waitingDay INT DEFAULT 0;
SELECT
DATEDIFF(requiredDate, shippedDate)
1xx-Informal
100-Continue
2xx-Success
200-Ok
201-Created
202-Accepted
204-No-Content
3xx-Redirection
304-Not Modified
4xx-Client Error
@prashant4224
prashant4224 / Jenkinsfile
Created June 24, 2020 09:32
jenkinsfile and sonarqube
node {
echo "======================================="
echo "JENKINS_HOME = ${env.JENKINS_HOME}"
echo "JOB_NAME = ${env.JOB_NAME}"
echo "REPO_GIT = " + REPO_GIT
echo "DEFAULT_GIT_BRANCH = "+ DEFAULT_GIT_BRANCH
echo "SONAR_SERVER = "+ SONAR_SERVER
echo "======================================="
def sonarInstance=hudson.plugins.sonar.SonarInstallation.get(SONAR_SERVER).name;
@prashant4224
prashant4224 / Jenkinsfile
Created June 24, 2020 09:34 — forked from mskutin/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage concurrency constraints, ...
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
/*
Please make sure to add the following environment variables:
HEROKU_PREVIEW=<your heroku preview app>
HEROKU_PREPRODUCTION=<your heroku pre-production app>
HEROKU_PRODUCTION=<your heroku production app>
Comparator vs Comparable