Skip to content

Instantly share code, notes, and snippets.

View tomekit's full-sized avatar

Tom Raganowicz tomekit

View GitHub Profile
@tomekit
tomekit / ConvertMySQLtoPgSQL.php
Created March 30, 2018 09:17
Intention is to run MySQL query against PostgreSQL. This adds double quotes to each fieldName, tableName, tableName, so PostgreSQL doesn't lower() names;
<?php
class ConvertMySQLToPgSQL {
/**
* @var \PHPSQLParser\PHPSQLParser
*/
protected $parser;
/**
@tomekit
tomekit / ConvertMySQLtoPgSQL.php
Last active March 30, 2018 09:26
Intention is to run MySQL query against PostgreSQL. This adds double quotes to each query fieldName, tableName, tableName, so PostgreSQL doesn't lower() names; It also encloses strings within single quotes (and removes double quotes); It encloses integers within single quotes (in case you insert/compare it against boolean); This is something whi…
<?php
class ConvertMySQLToPgSQL {
/**
* @var \PHPSQLParser\PHPSQLParser
*/
protected $parser;
/**
@tomekit
tomekit / RedisQueueStorage.php
Created March 6, 2019 21:39
My way to implement SQS-like queue with delay / visibilityTimeout option and retry
<?php
class RedisQueueStorage
{
/**
* @var EasyRedis|Redis
*/
protected $redis;