@@ -3,11 +3,34 @@ Shell for PHPCR
33
44Shell for PHPCR
55
6- ## Conncting
6+ ## Building
7+
8+ The recommended way to use the PHPCR shell is as a phar archive.
9+
10+ Currently there is no stable release and so it is necessary to build it manually.
11+
12+ Install box: http://box-project.org
13+
14+ Build the PHAR:
15+
16+ ```` bash
17+ $ cd phpcr-shell
18+ $ box build
19+ ````
20+
21+ This will produce the file ` phpcr.phar ` .
22+
23+ Copy this file to your bin directory:
24+
25+ ```` bash
26+ $ sudo cp phpcr.sh /usr/bin
27+ ````
28+
29+ ## Connecting
730
831To connect to a doctrine-dbal PHPCR repository:
932
10- $ php bin/ phpcr --db-name=foobar --db-username=user --db-password=foobar
33+ $ phpcr --db-name=foobar --db-username=user --db-password=foobar
1134
1235Full definition:
1336
@@ -40,21 +63,31 @@ Options:
4063JCR_SQL2 Select queries can be executed in the same way as in the MySQL shell:
4164
4265` ` ` ` bash
43- PHPCR > SELECT * FROM nt:unstructured;
44- 0
45- nt:unstructured
46- /
47- jcr:primaryType Name: nt:unstructured
48- 1
49- nt:unstructured
50- /cms
51- jcr:primaryType Name: nt:unstructured
52- phpcr:class String: DTL\W ebBundle\D ocument\S ite
53- 2
54- nt:unstructured
55- /cms/routes
56- jcr:primaryType Name: nt:unstructured
57- ...
66+ PHPCR > select * from [n:unstructured]
67+ | Row: # 0 Score: 3
68+ | Sel: nt:unstructured Path: /foobar/barfoo UID: none
69+ +-----------------+--------+----------+-----------------+
70+ | Name | Type | Multiple | Value |
71+ +-----------------+--------+----------+-----------------+
72+ | phpcr | String | no | foo |
73+ | jcr:primaryType | Name | no | nt:unstructured |
74+ +-----------------+--------+----------+-----------------+
75+
76+ | Row: # 1 Score: 3
77+ | Sel: nt:unstructured Path: /foo UID: none
78+ +-----------------+------+----------+-----------------+
79+ | Name | Type | Multiple | Value |
80+ +-----------------+------+----------+-----------------+
81+ | jcr:primaryType | Name | no | nt:unstructured |
82+ +-----------------+------+----------+-----------------+
83+
84+ | Row: # 2 Score: 3
85+ | Sel: nt:unstructured Path: /foobar UID: none
86+ +-----------------+------+----------+-----------------+
87+ | Name | Type | Multiple | Value |
88+ +-----------------+------+----------+-----------------+
89+ | jcr:primaryType | Name | no | nt:unstructured |
90+ +-----------------+------+----------+-----------------+
5891` ` ` `
5992
6093# # Changing the CWD
0 commit comments