• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

znframework / fullpack-edition / 12603164498

03 Jan 2025 07:56PM UTC coverage: 98.203% (-0.5%) from 98.707%
12603164498

push

github

zntr
Changed test.yml file.

10329 of 10518 relevant lines covered (98.2%)

16.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Internal/package-database/SQLServer/DBForge.php
1
<?php namespace ZN\Database\SQLServer;
2
/**
3
 * ZN PHP Web Framework
4
 * 
5
 * "Simplicity is the ultimate sophistication." ~ Da Vinci
6
 * 
7
 * @package ZN
8
 * @license MIT [http://opensource.org/licenses/MIT]
9
 * @author  Ozan UYKUN [ozan@znframework.com]
10
 */
11

12
use ZN\Database\DriverForge;
13

14
class DBForge extends DriverForge
15
{
16
    /**
17
     * Unsupported
18
     */
19
    public function extras($extras)
20
    {
21
        return NULL;
×
22
    }
23
    
24
    /**
25
     * Rename column
26
     * 
27
     * @param string $table
28
     * @param array  $column
29
     * 
30
     * @return string
31
     */
32
    public function renameColumn($table, $column)
33
    { 
34
        return "sp_rename '$table." . key($column) . "', '" . current($column) . "', 'COLUMN';";
×
35
    }
36

37
    /**
38
     * Drop index
39
     *
40
     * 5.7.4[added]
41
     * 
42
     * @param string $indexName
43
     * @param string $table
44
     * 
45
     * @return string
46
     */
47
    public function dropIndex($indexName, $table)
48
    {
49
        return 'DROP INDEX ' . $table . '.' . $indexName . ';';
×
50
    }
51

52
    /**
53
     * Rename Table
54
     * 
55
     * @param string $name
56
     * @param string $newname
57
     * 1
58
     * @return string
59
     */
60
    public function renameTable($name, $newName)
61
    {
62
        return "sp_rename '$name', '$newName';";
×
63
    }
64

65
    /**
66
     * Add Column
67
     * 
68
     * @param string $table
69
     * @param array  $columns
70
     * 
71
     * @return string
72
     */
73
    public function addColumn($table, $columns)
74
    {
75
        return 'ALTER TABLE ' . $table . ' ADD ' . $this->buildForgeColumnsQuery($columns) . ';';
×
76
    }
77

78
    /**
79
     * MOdify Column
80
     * 
81
     * @param string $table
82
     * @param array  $columns
83
     * 
84
     * @return string
85
     */
86
    public function modifyColumn($table, $columns)
87
    {
88
        return 'ALTER TABLE ' . $table . ' ALTER COLUMN ' . $this->buildForgeColumnsQuery($columns) . ';';
×
89
    }
90

91
    /**
92
     * Drop Column
93
     * 
94
     * @param string $table
95
     * @param array  $columns
96
     * 
97
     * @return string
98
     */
99
    public function dropColumn($table, $column)
100
    {
101
        return 'ALTER TABLE ' . $table . ' DROP COLUMN ' . $column . ';';
×
102
    }
103

104
    /**
105
     * Create index
106
     *
107
     * 5.7.4[added]
108
     * 
109
     * @param string $indexName
110
     * @param string $table
111
     * @param string $columns
112
     * 
113
     * @return string
114
     */
115
    public function createFulltextIndex($indexName, $table, $columns)
116
    {
117
        return false;
×
118
    }
119
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc