Download the PHP package kynx/gqlite without Composer

On this page you can find all versions of the php package kynx/gqlite. 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 gqlite

kynx/gqlite

Continuous Integration

Talk to an embedded graph database with PHP.

This project is in the early stages of development! Feel free to play, but bear in mind that there are a lot of missing features!

This package provides a driver for the SQLite-based graph database GraphQLite. If you came here looking for something to handle the GraphQL protocol, you're in the wrong place: try Packagist!

Installation

GraphQLite provides an SQLLite extension that must be available locally. There are a few ways to install it.

Via a Package Manager

Make a note of the path it's installed graphqlite.(dylib|so|dll) to - you will need this later.

Download a Release Binary

Binary builds are available from the GraphQLite GitHub repository: https://github.com/colliery-io/graphqlite/releases/latest. Download the dylib, so or dll file suitable for your platform.

Build from Source

See the From Source instructions in the GraphQLite documentation.

Usage

This library provides convenience methods to make managing the nodes and edges of your graph simple and type-safe. It also allows you to query the GraphQLite database using the Cypher language:

To learn more about Cypher, see the Neo4J manual. GraphQLite supports a subset of the language.

To learn more about GraphQLite, see the excellent documentation.

The Graph object

The Graph object has a number entrypoints:

Entrypoint Description
Graph::nodes CRUD operations on nodes
Graph::edges CRUD operations on edges
Graph::centrality Algorithms for ranking node importance
Graph::traversals Breadth and depth-first traversals
Graph::query() Execute raw Cypher queries

Nodes and Edges

The CRUD operations consume and return Node and Edge value objects.

A Node has an ID, an associative array of properties and one or more labels. Properties are where you store data associated with the node. Labels are like tags, and are used to query the database for specific nodes.

An Edge connects two nodes. It has a source ID, a target ID, a relation type and an associative array of properties. As with node labels, the relation type is used query the database for specific types of relations.

Queries

The Graph::query() method returns a Result object. Iterating that will give you an associate array. For example, MATCH (n {id: 'alice'}) RETURN n will give you a structure like:

Note there are two IDs! The first is the identifier generated by SQLite for the node, the second is the one you assigned.

For Cypher queries, only the second is of any use. To avoid confusion we recommend mapping the results to Node and Edge objects. The Usage example above could be re-written:

See static-analysis.php in the examples directory for the full code, with type-safety thrown in.

Parameters

Just as with SQL, do not pass user input directly into the query. Instead use placeholders and parameters to ensure they are sanitized. Cypher uses the dollar sign ($) to denote a placeholder:

Make sure your query is single-quoted so PHP variables are not expanded!

Centrality

Algorithms for ranking node importance.

Method Description
Graph::centrality::betweenness() Ranks nodes based on how often a node lies on shortest path between nodes.
Graph::centrality::closeness() Ranks nodes based on how close a node is to all other nodes
Graph::centrality::degree() Returns the in-degree, out-degree, and total degree for each node
Graph::centrality::eigenvector() Ranks nodes based on connections to other important nodes
Graph::centrality::pageRank() Ranks nodes based on PageRank algorithm
Graph::centrality::topPageRank() As above, but only returns the first n results

Supported Versions

This library aims to support the latest version of GraphQLite. Older versions may work, but we do not test against them. Currently GraphQLite is pre-1.0.


All versions of gqlite with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4.0 || ^8.5.0
ext-pdo Version *
ext-pdo_sqlite Version *
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 kynx/gqlite contains the following files

Loading the files please wait ...