yii\db\SchemaBuilderTrait::float PHP Méthode

float() public méthode

Creates a float column.
Since: 2.0.6
public float ( integer $precision = null ) : ColumnSchemaBuilder
$precision integer column value precision. First parameter passed to the column type, e.g. FLOAT(precision). This parameter will be ignored if not supported by the DBMS.
Résultat ColumnSchemaBuilder the column instance which can be further customized.
    public function float($precision = null)
    {
        return $this->getDb()->getSchema()->createColumnSchemaBuilder(Schema::TYPE_FLOAT, $precision);
    }