This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pear channel-discover pear.phpunit.de | |
pear channel-discover pear.symfony-project.com | |
pear channel-update pear.symfony-project.com | |
pear upgrade | |
pear install pear.phpunit.de/PHPUnit | |
https://github.com/sebastianbergmann/phpunit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$loader = require __DIR__."/../vendor/autoload.php"; | |
$database = new Pomm\Connection\Database(array('dsn' => 'pgsql://user:password@host:port/db_name')); | |
$scan = new Pomm\Tools\ScanSchemaTool(array( | |
'schema' => 'public', | |
'database' => $database, | |
'prefix_dir' => '/tmp' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
$transformers = $database | |
->getConnection() | |
->getMapFor('YourDb\Online\PowerSupplyTransformer') | |
->findWhere('stock > $* and voltage = $*', array(5, 220)); | |
foreach($transformers as $transformer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
$cars = $database | |
->createConnection() | |
->getMapFor('YourDb\Garage\Car') | |
->getSportAndColors(array('blue', 'red', 'yellow')) | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace YourDb\Blog; | |
use YourDb\Blog\Base\PostMap as BasePostMap; | |
use Pomm\Exception\Exception; | |
use Pomm\Query\Where; | |
class PostMap extends BasePostMap | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TYPE transformer_winding AS (voltage NUMERIC(5,1), current NUMERIC(5,3)); | |
CREATE TABLE power_supply_transformer(reference CHAR(6) PRIMARY KEY, pri transformer_winding NOT NULL, secs transformer_winding[] NOT NULL, size_reference VARCHAR(5) NOT NULL); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make it use C-a, similar to screen.. | |
unbind C-b | |
unbind l | |
set -g prefix C-a | |
bind-key a send-prefix | |
bind-key C-a last-window | |
# Remove default binding for split | |
unbind % |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- PostgreSQL database dump | |
-- | |
SET statement_timeout = 0; | |
SET client_encoding = 'UTF8'; | |
SET standard_conforming_strings = off; | |
SET check_function_bodies = false; | |
SET client_min_messages = warning; | |
SET escape_string_warning = off; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function help() | |
{ | |
printf("Usage:\n"); | |
printf("generate_model schema environment\n"); | |
printf("\nschema is the database schema you want to scan.\n"); | |
printf("environment set the database connection that will be used (default: dev).\n"); | |
exit(1); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function help() | |
{ | |
printf("Get the stored procedures source code.\n"); | |
printf("Usage:\n"); | |
printf("show_sp_source schema name\n"); | |
printf("\nname is the stored procedure's name.\n"); | |
printf("schema is the database schema.\n"); | |
printf("environment set the database connection that will be used (default: dev).\n"); |