Skip to content

Commit 0d2159e

Browse files
committed
Merge branch '63'
2 parents c83daa2 + 74e812b commit 0d2159e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2717
-313
lines changed

ext/config.w32

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ if (PHP_CASSANDRA != "no") {
9191
"Cluster.c " +
9292
"Collection.c " +
9393
"Column.c " +
94+
"Date.c " +
9495
"Decimal.c " +
9596
"DefaultAggregate.c " +
9697
"DefaultCluster.c " +
@@ -125,12 +126,15 @@ if (PHP_CASSANDRA != "no") {
125126
"Session.c " +
126127
"Set.c " +
127128
"SimpleStatement.c " +
129+
"Smallint.c " +
128130
"SSLOptions.c " +
129131
"Statement.c " +
130132
"Table.c " +
133+
"Time.c " +
131134
"Timestamp.c " +
132135
"TimestampGenerator.c " +
133136
"Timeuuid.c " +
137+
"Tinyint.c " +
134138
"Tuple.c " +
135139
"Type.c " +
136140
"UserTypeValue.c " +
@@ -202,6 +206,7 @@ if (PHP_CASSANDRA != "no") {
202206
"/LTCG " +
203207
"/NODEFAULTLIB:LIBCMT.LIB " +
204208
"/NODEFAULTLIB:LIBCMTD.LIB");
209+
CHECK_HEADER_ADD_INCLUDE("timelib_config.h", "CFLAGS_CASSANDRA", "ext/date/lib");
205210
ADD_FLAG("CFLAGS_CASSANDRA",
206211
"/I " + configure_module_dirname + " " +
207212
"/I " + PHP_CASSANDRA_CPP_DRIVER + "/include " +

ext/doc/Cassandra/Cluster/Builder.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,15 @@ public function withTCPNodelay($enabled = true) {}
240240
*/
241241
public function withTCPKeepalive($delay) {}
242242

243+
/**
244+
* Configures the retry policy.
245+
*
246+
* @param RetryPolicy $policy the retry policy to use.
247+
*
248+
* @return Builder self
249+
*/
250+
public function withRetryPolicy(RetryPolicy $policy) {}
251+
243252
/**
244253
* Sets the timestamp generator.
245254
*

ext/doc/Cassandra/Date.php

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
3+
/**
4+
* Copyright 2015-2016 DataStax, Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
namespace Cassandra;
20+
21+
/**
22+
* A PHP representation of the CQL `date` type.
23+
*/
24+
final class Date implements Value
25+
{
26+
/**
27+
* Creates a new Date object
28+
*
29+
* @param int $seconds Absolute seconds from epoch (1970, 1, 1), can be negative, defaults to current time
30+
*/
31+
public function __construct($seconds = null) {}
32+
33+
/**
34+
* The type of this date.
35+
*
36+
* @return Type
37+
*/
38+
public function type() {}
39+
40+
/**
41+
* @return int Absolute seconds from epoch (1970, 1, 1), can be negative
42+
*/
43+
public function seconds() {}
44+
45+
/**
46+
* Converts current date to PHP DateTime.
47+
*
48+
* @return \DateTime PHP representation
49+
*/
50+
public function toDateTime() {}
51+
52+
/**
53+
* @return string this date in string format: Cassandra\Date(seconds=$seconds)
54+
*/
55+
public function __toString() {}
56+
}

ext/doc/Cassandra/Float.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static function max() {}
4040
/**
4141
* Creates a new float.
4242
*
43-
* @param string $value float value as a string
43+
* @param mixed $value float value as a string, number or Cassandra\Float
4444
*/
4545
public function __construct($value) {}
4646

@@ -54,7 +54,7 @@ public function type() {}
5454
/**
5555
* Returns the float value.
5656
*
57-
* @return string float value
57+
* @return float float value
5858
*/
5959
public function value() {}
6060

ext/doc/Cassandra/RetryPolicy/Logging.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ final class Logging implements RetryPolicy
3131
* @param Cassandra\RetryPolicy $childPolicy Any retry policy other than
3232
* Cassandra\Logging
3333
*/
34-
public function __construct($childPolicy) {}
34+
public function __construct(RetryPolicy $childPolicy) {}
3535
}

ext/doc/Cassandra/Smallint.php

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?php
2+
3+
/**
4+
* Copyright 2015-2016 DataStax, Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
namespace Cassandra;
20+
21+
22+
final class Smallint implements Value, Numeric
23+
{
24+
/**
25+
* Minimum possible Smallint value
26+
*
27+
* @return Smallint minimum value
28+
*/
29+
public static function min() {}
30+
31+
/**
32+
* Maximum possible Smallint value
33+
*
34+
* @return Smallint maximum value
35+
*/
36+
public static function max() {}
37+
38+
/**
39+
* Creates a new 16bit integer.
40+
*
41+
* @param string $value integer value as a string
42+
*/
43+
public function __construct($value) {}
44+
45+
/**
46+
* @param Numeric $addend a number to add to this one
47+
*
48+
* @return Numeric sum
49+
*/
50+
public function add(Numeric $addend) {}
51+
52+
/**
53+
* @param Numeric $subtrahend a number to subtract from this one
54+
*
55+
* @return Numeric difference
56+
*/
57+
public function sub(Numeric $subtrahend) {}
58+
59+
/**
60+
* @param Numeric $multiplier a number to multiply this one by
61+
*
62+
* @return Numeric product
63+
*/
64+
public function mul(Numeric $multiplier) {}
65+
66+
/**
67+
* @param Numeric $divisor a number to divide this one by
68+
*
69+
* @return Numeric quotient
70+
*/
71+
public function div(Numeric $divisor) {}
72+
73+
/**
74+
* @param Numeric $divisor a number to divide this one by
75+
*
76+
* @return Numeric remainder
77+
*/
78+
public function mod(Numeric $divisor) {}
79+
80+
/**
81+
* @return Numeric absolute value
82+
*/
83+
public function abs() {}
84+
85+
/**
86+
* @return Numeric negative value
87+
*/
88+
public function neg() {}
89+
90+
/**
91+
* @return Numeric square root
92+
*/
93+
public function sqrt() {}
94+
95+
/**
96+
* @return int this number as int
97+
*/
98+
public function toInt() {}
99+
100+
/**
101+
* @return float this number as float
102+
*/
103+
public function toDouble() {}
104+
105+
/**
106+
* The type of this value (smallint).
107+
*
108+
* @return Type
109+
*/
110+
public function type() {}
111+
112+
/**
113+
* Returns the integer value.
114+
*
115+
* @return int integer value
116+
*/
117+
public function value() {}
118+
}

ext/doc/Cassandra/Time.php

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
3+
/**
4+
* Copyright 2015-2016 DataStax, Inc.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
namespace Cassandra;
20+
21+
/**
22+
* A PHP representation of the CQL `time` type.
23+
*/
24+
final class Time implements Value
25+
{
26+
/**
27+
* Creates a new Time object
28+
*
29+
* @param int|string $nanoseconds Number of nanoseconds since last microsecond
30+
*/
31+
public function __construct($nanoseconds = 0) {}
32+
33+
34+
/**
35+
* Creates a new Time object with the current time.
36+
*
37+
* @return Time
38+
*/
39+
public static function now() {}
40+
41+
/**
42+
* The type of this date.
43+
*
44+
* @return Type
45+
*/
46+
public function type() {}
47+
48+
/**
49+
* @return int number of nanoseconds since the last full microsecond since
50+
* the last full second since the last full minute since the
51+
* last full hour since midnight
52+
*/
53+
public function nanoseconds() {}
54+
55+
/**
56+
* @return string this date in string format: Cassandra\Time(nanoseconds=$nanoseconds)
57+
*/
58+
public function __toString() {}
59+
}

0 commit comments

Comments
 (0)