Giter Site home page Giter Site logo

dbix-class-schema-pgsettimezone's Introduction

NAME

DBIx::Class::Schema::PgSetTimezone

SYNOPSIS

# Define your Schema class
package MyApp::Schema;
use base qw/DBIx::Class::Schema::PgSetTimezone/;

__PACKAGE__->load_classes(qw/Arthur Ford Zaphod/);

# Initialize the schema
# (Only hashref connect_info style supported)
$schema = MyApp::Schema->connection({
  dsn => 'dbi:Pg:database=myapp',
  user => undef,
  pass => undef,
  auto_commit => 1,
  raise_error => 1,
)};

# Set time zone for the connection. SQL will be executed immediately,
# and on any further connect/reconnects
$schema->timezone('America/Chicago');

DESCRIPTION

Component for DBIx::Class::Schema

Set the connection time_zone in a way that persists within connection managers like DBIx::Connection and Catalyst::Model::DBIC::Schema

About Schema->connection() parameters

Schema->connection() supports several formats of parameter list

This module only supports a hashref parameter list, as in the synopsis

METHODS

timezone TIME_ZONE

Read or set the time zone string

METHODS Overload

connection %connect_info

Overload "connection" in DBIx::Class::Schema

Inserts a callback into "on_connect_call" in DBIx::Class::Storage::DBI

Use of this module requires using only the hashref style of connect_info arguments. Other connect_info formats are not supported. See "connect_info" in DBIx::Class::Storage::DBI

INTERNAL SUBS

__dbh_do_set_timezone $storage, $timezone

Execute sql statement to set session time zone

SEE ALSO

DBIx::Class::Schema, DBIx::Connection, Catalyst::Model::DBIC::Schema

COPYRIGHT

(c) 2019 Mitch Jackson [email protected] under the perl5 license

dbix-class-schema-pgsettimezone's People

Contributors

mitchjacksontech avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.