Download the PHP package konstmal/postgresify without Composer

On this page you can find all versions of the php package konstmal/postgresify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package postgresify

Postgresify

Note

This package is under development.

Table of Contents

What is this?

Installation

Geometric Types

Monetary Types

Network Address Types

Range Types

License

References

What is this?

Postgresify is a package for Laravel and Lumen that extends support to some of the more useful PostgreSQL data types. This package allows you to leverage PostgreSQL's data types, such as point, inet, circle, etc., within Laravel's Schema Builder and retrieve meaningful data from Fluent/Eloquent.

Example Migration:

Life's easier, right? The above use cases of PostgreSQL's types eliminate a few immediately noticeable headaches:

Now let's discuss the actual utility afforded by these additional types. PostgreSQL is nicely equipped with functions and operators for meaningfully working with these data types. This depends on the architecture of your environment, but these types combined with the functions/operators allow you to offload some work onto your database server--which might be faster and could reduce some responsibilities within your application's code. Your mileage may vary. See this StackExchange Q/A.

Installation

To install this package you will need:

This package is intended for PostgreSQL 9.4+.

Add this package to your file as a dependency:

Laravel

After installing via Composer, register Postgresify's in your configuration file like so:

Basic Usage

If you would like code completion in your IDE for the PostgreSQL types made available via Postgresify, be sure your migrations (or other uses of Illuminate's Schema Builder) the class as in this example:

Geometric Types

The geometric types in PostgreSQL can give you a ton of power while reducing complexity in your application.

PostgreSQL's geometric types do not try to replace the need for PostGIS in cases where geographic calculations are performed. Remember this is geometric, not geographic--the Earth is not flat, or even a perfect sphere, it's an oblate spheroid (ellipsoid). That being said, don't use geometric types for heavy geographic work. Please use PostGIS if you determine a need, your accuracy depends on it. For those of you would-be geodesy aficionados, check out Charles F. F. Karney's work. Karney's algorithms are accurate to within 15 nm.

Box

Circle

Line

Line Segment

Path

Point

Polygon

Monetary Types

Methods of storing currency in an application/database make a hot topic for debate, and there is a ton of misinformation on this topic. People start citing GAAP, and then it boils down to developers' non-standard preferences. There is too much uncertainty, and I just do not like it. Let's look at some common methods for storing currency:

  1. Store as . Don't do this, you'll have garbage for accuracy.
  2. Store as /. This is fine and handles the cases where you need to store fractions of a cent. Decimal can be a hit to your performance in analytical operations.
  3. Store as using cents (or other currency's base unit) or use . This is best, and works in cases where you do not need fractions of a cent. PostgreSQL's stores as an integer (of cents) but cleans up the display and return of doing so. is more performant than . The range of is -92233720368547758.08 to +92233720368547758.07, so yeah, it will handle large amounts.

Money

Network Address Types

Network addresses can be a pain to work with. Imagine the use case where you would need to query all IP addresses of a certain subnet mask. PostgreSQL has Network Address Functions and Operators for purposes like this.

I made a pull request for the IP and MAC address types in Laravel. So these two types will be in your initial Laravel installation (5.2.27+), and should work across all of Laravel's supported database systems. However, PostgreSQL, unlike other database systems, has its rich set of network address functions and operators built-in.

IP Address

MAC Address

Netmask

Range Types

Ranges are quite powerful. A range includes a lower-bound and an upper-bound, either of which can be inclusive or exclusive. It would take four columns to build that functionality without a range type. Check out PostgreSQL's Range Functions and Operators documentation.

Date Range

Integer Range

Numeric Range

Timestamp Range

Timestamp Range w/ Timezone

License

References


All versions of postgresify with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
illuminate/database Version ~5.1
illuminate/support Version ~5.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package konstmal/postgresify contains the following files

Loading the files please wait ....