Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Oct 18, 2021. It is now read-only.

[Archive] Experimental MongoDB driver for HHVM - This Repository is NOT a supported MongoDB product

License

NotificationsYou must be signed in to change notification settings

mongodb-labs/mongo-hhvm-driver-unsupported

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: This repository is unsupported and no longer under active development. Please seemongodb/mongo-hhvm-driver for our official HHVM driver.


DISCLAIMER

Please note: all tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. We disclaim any and all warranties, either express or implied, including but not limited to any warranty of noninfringement, merchantability, and/ or fitness for a particular purpose. We do not warrant that the technology will meet your requirements, that the operation thereof will be uninterrupted or error-free, or that any errors will be corrected.Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use.You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.

MongoDB driver for HHVM

This is an implementation of theMongoDB PHP driver forHHVM. It is not feature-complete and shouldbe considered experimental.

This project is not officially supported and GitHub issues have been disabled.

Dependencies

Compiling this extension requires the following libraries:

  • HHVM (>=3.1.0) must be compiled from source, since the binary distributionsof HHVM do not include necessary development headers. Instructions forcompiling HHVM may be foundhere.

  • libmongoc (>=0.94.0) and its corresponding libbson dependency must beinstalled as a system library. Instructions for installing libmongoc may befoundhere.

Building and installation

Ensure that theHPHP_HOME environment variable is set to the HHVM projectdirectory. This should be the path to the cloned HHVM git repository where youcompiled the project.

$export HPHP_HOME=/path/to/hhvm

Execute this project'sbuild.sh script:

$ ./build.sh

This script checks for the HHVM path, executeshphpize to prepare the buildprocess, and finally executescmake andmake to compile the extension.

The build process will produce amongo.so file, which can then be dynamicallyloaded by HHVM by adding the following to HHVM'sconfig.hdf file:

DynamicExtensions {  mongo = /path/to/mongo.so}

This example is taken from theExtension APIdocumentation.

Note that themongo key in this example is a placeholder; HHVM only cares thatthe path to themongo.so file is correct. You may notice that in our testscript, we use0 as a key when specifying our extension via the command line.

Tests

The test suite is implemented withPHPUnit and may beexecuted via thetest.sh script:

$ ./test.sh

The test script depends on theHPHP_HOME environment variable and will attemptto locate PHPUnit via thewhich command, so ensure that thephpunit binaryis installed in an executable path.

Interactive Mode

To try out this work in progress for yourself, you can run the extension in interactive mode on HipHop VM via theinteractive_mode.sh script:

$ ./interactive_mode.sh

Once in interactive mode, you can execute queries and all implemented methods on your existing local databases. For example, if atest database exists with astudents collection, I can access one document in that collection by running the following commands:

hphpd> $cli = new MongoClient();hphpd> $db = $cli->selectDB('test');hphpd> $coll = $db->selectCollection('students');hphpd> $cur = $coll->find()->limit(1);hphpd> $cur->rewind();hphpd> var_dump($cur->current());

Credits

Máximo Cuadros created the src/contrib/encode.h, src/contrib/encode.cpp and src/contrib/classes.h files.

About

[Archive] Experimental MongoDB driver for HHVM - This Repository is NOT a supported MongoDB product

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors11


[8]ページ先頭

©2009-2025 Movatter.jp