This file contains 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
from sqlalchemy import func | |
from sqlalchemy.types import UserDefinedType, Float | |
class EasyGeometry(UserDefinedType): | |
def get_col_spec(self): | |
return "GEOMETRY" | |
def bind_expression(self, bindvalue): |
This file contains 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 Qc\Helpers; | |
use Phalcon\Mvc\View; | |
class ListingHelper extends \Phalcon\Tag | |
{ | |
public function renderField($field, $data){ | |
$config = $this->getDI()->get('config'); |
This file contains 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 Qc\Models; | |
class Specimens extends \Phalcon\Mvc\Model | |
{ | |
public function initialize(){ | |
$this->belongsTo( | |
"sample_id", | |
"Qc\\Models\\Samples", | |
"id" | |
); |
This file contains 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 Qc\Models; | |
class Samples extends \Phalcon\Mvc\Model | |
{ | |
public function initialize(){ | |
$this->hasMany( | |
"id", | |
"Qc\\Models\\Specimens", | |
"sample_id" | |
); |