App-ProxyHunter-Model-Schema-SQLite

 view release on metacpan or  search on metacpan

lib/App/ProxyHunter/Model/Schema/SQLite.pm  view on Meta::CPAN

package App::ProxyHunter::Model::Schema::SQLite;

use Mo;
use Teng::Schema::Declare;
use DateTime;
use App::ProxyHunter::Constants;
use App::ProxyHunter::Model::SchemaUtils qw'proxy_name_to_type proxy_type_to_name';
extends 'App::ProxyHunter::Model::Schema';

our $VERSION = '0.01';

sub perl_datetime_to_sql {
	return unless defined $_[0];
	$_[0]->epoch;
}

sub sql_datetime_to_perl {
	return unless defined $_[0];
	DateTime->from_epoch(epoch => $_[0], time_zone => TZ);
}

table {
	name 'proxy';
	pk 'id';
	columns qw(
		id
		host
		port
		checked



( run in 0.350 second using v1.01-cache-2.11-cpan-05444aca049 )