Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2bootstrap
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
yii2bootstrap
Commits
f7b7c758
Commit
f7b7c758
authored
Nov 01, 2013
by
Paul Klimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sphinx test environment setup files added.
parent
e0429ca4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
183 additions
and
1 deletion
+183
-1
Connection.php
extensions/sphinx/yii/sphinx/Connection.php
+7
-1
Schema.php
extensions/sphinx/yii/sphinx/Schema.php
+19
-0
sphinx.conf
tests/unit/data/sphinx/sphinx.conf
+86
-0
sphinx.sql
tests/unit/data/sphinx/sphinx.sql
+71
-0
No files found.
extensions/sphinx/yii/sphinx/Connection.php
View file @
f7b7c758
...
@@ -15,5 +15,11 @@ namespace yii\sphinx;
...
@@ -15,5 +15,11 @@ namespace yii\sphinx;
*/
*/
class
Connection
extends
\yii\db\Connection
class
Connection
extends
\yii\db\Connection
{
{
//
/**
* @inheritdoc
*/
public
$schemaMap
=
[
'mysqli'
=>
'yii\sphinx\Schema'
,
// MySQL
'mysql'
=>
'yii\sphinx\Schema'
,
// MySQL
];
}
}
\ No newline at end of file
extensions/sphinx/yii/sphinx/Schema.php
0 → 100644
View file @
f7b7c758
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace
yii\sphinx
;
/**
* Class Schema
*
* @author Paul Klimov <klimov.paul@gmail.com>
* @since 2.0
*/
class
Schema
extends
\yii\db\mysql\Schema
{
//
}
\ No newline at end of file
tests/unit/data/sphinx/sphinx.conf
0 → 100644
View file @
f7b7c758
#
# Minimal Sphinx configuration sample (clean, simple, functional)
#
source
yii2_test_article_src
{
type
=
mysql
sql_host
=
localhost
sql_user
=
sql_pass
=
sql_db
=
yii2test
sql_port
=
3306
# optional, default is 3306
sql_query
= \
SELECT
*,
UNIX_TIMESTAMP
(
create_date
)
AS
add_date
\
FROM
yii2_test_article
sql_attr_uint
=
id
sql_attr_timestamp
=
add_date
sql_query_info
=
SELECT
*
FROM
yii2_test_article
WHERE
id
=$
id
}
source
yii2_test_item_src
{
type
=
mysql
sql_host
=
localhost
sql_user
=
sql_pass
=
sql_db
=
yii2test
sql_port
=
3306
# optional, default is 3306
sql_query
= \
SELECT
*,
CURRENT_TIMESTAMP
()
AS
add_date
\
FROM
yii2_test_item
sql_attr_uint
=
id
sql_attr_timestamp
=
add_date
sql_query_info
=
SELECT
*
FROM
yii2_test_item
WHERE
id
=$
id
}
index
yii2_test_article_index
{
source
=
yii2_test_article_src
path
= /
var
/
lib
/
sphinx
/
yii2_test_article_src
docinfo
=
extern
charset_type
=
sbcs
}
index
yii2_test_item_index
{
source
=
yii2_test_item_src
path
= /
var
/
lib
/
sphinx
/
yii2_test_item_src
docinfo
=
extern
charset_type
=
sbcs
}
indexer
{
mem_limit
=
32
M
}
searchd
{
listen
=
127
.
0
.
0
.
1
:
9312
listen
=
9306
:
mysql41
log
= /
var
/
log
/
sphinx
/
searchd
.
log
query_log
= /
var
/
log
/
sphinx
/
query
.
log
read_timeout
=
5
max_children
=
30
pid_file
= /
var
/
run
/
sphinx
/
searchd
.
pid
max_matches
=
1000
seamless_rotate
=
1
preopen_indexes
=
1
unlink_old
=
1
workers
=
threads
# for RT to work
binlog_path
= /
var
/
lib
/
sphinx
}
tests/unit/data/sphinx/sphinx.sql
0 → 100644
View file @
f7b7c758
-- phpMyAdmin SQL Dump
-- version 3.5.0
-- http://www.phpmyadmin.net
--
-- Host: 10.10.50.201
-- Generation Time: Nov 01, 2013 at 04:38 PM
-- Server version: 5.1.69-log
-- PHP Version: 5.3.3
SET
SQL_MODE
=
"NO_AUTO_VALUE_ON_ZERO"
;
SET
time_zone
=
"+00:00"
;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */
;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */
;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */
;
/*!40101 SET NAMES utf8 */
;
--
-- Database: `yiiexample`
--
-- --------------------------------------------------------
--
-- Table structure for table `yii2_test_article`
--
CREATE
TABLE
IF
NOT
EXISTS
`yii2_test_article`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`title`
varchar
(
255
)
NOT
NULL
,
`content`
text
NOT
NULL
,
`author_id`
int
(
11
)
NOT
NULL
,
`create_date`
datetime
NOT
NULL
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
AUTO_INCREMENT
=
3
;
--
-- Dumping data for table `yii2_test_article`
--
INSERT
INTO
`yii2_test_article`
(
`id`
,
`title`
,
`content`
,
`author_id`
,
`create_date`
)
VALUES
(
1
,
'About cats'
,
'This article is about cats'
,
1
,
'2013-10-23 00:00:00'
),
(
2
,
'About dogs'
,
'This article is about dogs'
,
2
,
'2013-11-15 00:00:00'
);
-- --------------------------------------------------------
--
-- Table structure for table `yii2_test_item`
--
CREATE
TABLE
IF
NOT
EXISTS
`yii2_test_item`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`name`
varchar
(
255
)
NOT
NULL
,
`description`
text
NOT
NULL
,
`category_id`
int
(
11
)
NOT
NULL
,
`price`
float
NOT
NULL
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
AUTO_INCREMENT
=
3
;
--
-- Dumping data for table `yii2_test_item`
--
INSERT
INTO
`yii2_test_item`
(
`id`
,
`name`
,
`description`
,
`category_id`
,
`price`
)
VALUES
(
1
,
'pencil'
,
'Simple pencil'
,
1
,
2
.
5
),
(
2
,
'table'
,
'Wooden table'
,
2
,
100
);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */
;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */
;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment