mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 16:39:04 +02:00
74 lines
2.4 KiB
JSON
74 lines
2.4 KiB
JSON
|
{
|
||
|
"DB-delete.sublime-snippet": {
|
||
|
"prefix": "DB::delete",
|
||
|
"body": [
|
||
|
"DB::delete(${1:'delete users where name = ?'}${2:, ['John']})$3"
|
||
|
],
|
||
|
"description": "Run an delete statement against the database."
|
||
|
},
|
||
|
"DB-insert.sublime-snippet": {
|
||
|
"prefix": "DB::insert",
|
||
|
"body": [
|
||
|
"DB::insert(${1:'insert into users (id, name) values (?, ?)'}${2:, [1, 'Dayle']})$3"
|
||
|
],
|
||
|
"description": "Run an insert statement against the database."
|
||
|
},
|
||
|
"DB-select.sublime-snippet": {
|
||
|
"prefix": "DB::select",
|
||
|
"body": [
|
||
|
"DB::select(${1:'select * from users where active = ?'}${2:, [1]})$3"
|
||
|
],
|
||
|
"description": "Run a select statement against the database."
|
||
|
},
|
||
|
"DB-statement.sublime-snippet": {
|
||
|
"prefix": "DB::select",
|
||
|
"body": [
|
||
|
"DB::statement(${1:'drop table users'})$2"
|
||
|
],
|
||
|
"description": "Execute an SQL statement and return the boolean result."
|
||
|
},
|
||
|
"DB-transaction-begin.sublime-snippet": {
|
||
|
"prefix": "DB::transaction_begin",
|
||
|
"body": [
|
||
|
"DB::beginTransaction();"
|
||
|
],
|
||
|
"description": "Start a new database transaction."
|
||
|
},
|
||
|
"DB-transaction-commit.sublime-snippet": {
|
||
|
"prefix": "DB::transaction_commit",
|
||
|
"body": [
|
||
|
"DB::commit();"
|
||
|
],
|
||
|
"description": "Commit the active database transaction."
|
||
|
},
|
||
|
"DB-transaction-rollback.sublime-snippet": {
|
||
|
"prefix": "DB::transaction_rollback",
|
||
|
"body": [
|
||
|
"DB::rollback();"
|
||
|
],
|
||
|
"description": "Rollback the active database transaction."
|
||
|
},
|
||
|
"DB-transaction.sublime-snippet": {
|
||
|
"prefix": "DB::transaction",
|
||
|
"body": [
|
||
|
"DB::transaction(function () {",
|
||
|
" $1",
|
||
|
"});$2"
|
||
|
],
|
||
|
"description": "Execute a Closure within a transaction."
|
||
|
},
|
||
|
"DB-update.sublime-snippet": {
|
||
|
"prefix": "DB::update",
|
||
|
"body": [
|
||
|
"DB::update(${1:'update users set votes = 100 where name = ?'}${2:, ['John']});$3"
|
||
|
],
|
||
|
"description": "Run an update statement against the database."
|
||
|
},
|
||
|
"DB-table": {
|
||
|
"prefix": "DB::table",
|
||
|
"body": [
|
||
|
"DB::table('${1:users}')$2"
|
||
|
],
|
||
|
"description": "Retrieving rows from a table"
|
||
|
}
|
||
|
}
|