-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated email and filter snippets and created new ones for new version
- Loading branch information
Showing
15 changed files
with
134 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
\$db->affectedRows(); | ||
]]></content> | ||
<tabTrigger>ci_affectedrows</tabTrigger> | ||
<scope>source.php</scope> | ||
<description>CI4 - Displays the number of affected rows, when doing “write” type queries (insert, update, etc.).</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
\$db->countAll(); | ||
]]></content> | ||
<tabTrigger>ci_countall</tabTrigger> | ||
<scope>source.php</scope> | ||
<description>CI4 - Permits you to determine the number of rows in a particular table. Submit the table name in the first parameter.</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
\$builder->from('${1:fields}'); | ||
]]></content> | ||
<tabTrigger>ci_from</tabTrigger> | ||
<scope>source.php</scope> | ||
<description>CI4 - Permits you to write the FROM portion of your query</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
\$builder->join('${1:table_name}', '${2:table_name}.${3:pk} = ${4:table_name}.${1:fk}'); | ||
]]></content> | ||
<tabTrigger>ci_join</tabTrigger> | ||
<scope>source.php</scope> | ||
<description>CI4 - Permits you to write the JOIN portion of your query:</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
\$builder->whereNotIn('${1:field}', \$${1:array}); | ||
]]></content> | ||
<tabTrigger>ci_db_notin</tabTrigger> | ||
<scope>source.php</scope> | ||
<description>CI4 - Generates a WHERE field NOT IN (‘item’, ‘item’) SQL query joined with AND if appropriate</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
\$builder->orWhereNotIn('${1:field}', function(BaseBuilder \$builder) { | ||
return \$builder->select('${2:field}')->from('${3:table}')->where('${4:field}', ${5:value}); | ||
}); | ||
]]></content> | ||
<tabTrigger>ci_db_notinsub</tabTrigger> | ||
<scope>source.php</scope> | ||
<description>CI4 - Generates a WHERE field NOT IN (‘item’, ‘item’) SQL query joined with OR if appropriate with subqueries instead of an array of values.</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
\$db->getPlatform(); | ||
]]></content> | ||
<tabTrigger>ci_getplatform</tabTrigger> | ||
<scope>source.php</scope> | ||
<description>CI4 - Outputs the database platform you are running (MySQL, MS SQL, Postgres, etc…)</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
\$db->getVersion(); | ||
]]></content> | ||
<tabTrigger>ci_version</tabTrigger> | ||
<scope>source.php</scope> | ||
<description>CI4 - Outputs the database version you are running</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
\$db->insertID(); | ||
]]></content> | ||
<tabTrigger>ci_insertid</tabTrigger> | ||
<scope>source.php</scope> | ||
<description>CI4 - The insert ID number when performing database inserts.</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
\$db->getLastQuery(); | ||
]]></content> | ||
<tabTrigger>ci_lastquery</tabTrigger> | ||
<scope>source.php</scope> | ||
<description>CI4 - Returns a Query object that represents the last query that was run (the query string, not the result).</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Added some more codeigniter 4 snippets to our repo | ||
|
||
ci4_affectedRows | ||
ci4_countAll | ||
ci4_db_from | ||
ci4_db_join | ||
ci4_db_whereNotIn | ||
ci4_db_whereNotInSubquery | ||
ci4_getPlatform | ||
ci4_getVersion | ||
ci4_insertID | ||
ci4_lastQuery | ||
|
||
Fixed some existing snippets | ||
|
||
ci4_email_config | ||
ci4_filter |