Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for SQL (0.13 sec)

  1. logger/sql.go

    		for _, v := range []byte(sql) {
    			if v == '?' {
    				if len(vars) > idx {
    					newSQL.WriteString(vars[idx])
    					idx++
    					continue
    				}
    			}
    			newSQL.WriteByte(v)
    		}
    
    		sql = newSQL.String()
    	} else {
    		sql = numericPlaceholder.ReplaceAllString(sql, "$$$1$$")
    
    		sql = numericPlaceholderRe.ReplaceAllStringFunc(sql, func(v string) string {
    			num := v[1 : len(v)-1]
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  2. logger/sql_test.go

    		es                 = ExampleStruct{Name: "test", Val: "test"}
    		intVal   intType   = 1
    		floatVal floatType = 1.23
    	)
    
    	results := []struct {
    		SQL           string
    		NumericRegexp *regexp.Regexp
    		Vars          []interface{}
    		Result        string
    	}{
    		{
    			SQL:           "create table users (name, age, height, actived, bytes, create_at, update_at, deleted_at, email, role, pass) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/async-sql-databases.md

    # 异步 SQL 关系型数据库
    
    **FastAPI** 使用 <a href="https://github.com/encode/databases" class="external-link" target="_blank">`encode/databases`</a> 为连接数据库提供异步支持(`async` 与 `await`)。
    
    `databases` 兼容以下数据库:
    
    * PostgreSQL
    * MySQL
    * SQLite
    
    本章示例使用 **SQLite**,它使用的是单文件,且 Python 内置集成了 SQLite,因此,可以直接复制并运行本章示例。
    
    生产环境下,则要使用 **PostgreSQL** 等数据库服务器。
    
    !!! tip "提示"
    
    Plain Text
    - Registered: Sun Mar 31 07:19:09 GMT 2024
    - Last Modified: Sat Mar 30 22:44:40 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  4. docs/en/docs/how-to/async-sql-encode-databases.md

    Later, for your production application, you might want to use a database server like **PostgreSQL**.
    
    !!! tip
        You could adopt ideas from the section about SQLAlchemy ORM ([SQL (Relational) Databases](../tutorial/sql-databases.md){.internal-link target=_blank}), like using utility functions to perform operations in the database, independent of your **FastAPI** code.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/exception/ClSQLException.java

         *            引数の並び
         * @param sqlState
         *            SQLステート
         * @param vendorCode
         *            ベンダーコード
         * @param sql
         *            SQL文字列
         */
        public ClSQLException(final String messageCode, final Object[] args, final String sqlState, final int vendorCode, final String sql) {
            this(messageCode, args, sqlState, vendorCode, null, sql);
        }
    
        /**
         * {@link ClSQLException}を作成します。
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/sql/StatementUtil.java

     */
    package org.codelibs.core.sql;
    
    import static org.codelibs.core.log.Logger.format;
    import static org.codelibs.core.misc.AssertionUtil.assertArgumentNotEmpty;
    import static org.codelibs.core.misc.AssertionUtil.assertArgumentNotNull;
    
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    
    import org.codelibs.core.exception.SQLRuntimeException;
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  7. prepare_stmt.go

    package gorm
    
    import (
    	"context"
    	"database/sql"
    	"database/sql/driver"
    	"errors"
    	"reflect"
    	"sync"
    )
    
    type Stmt struct {
    	*sql.Stmt
    	Transaction bool
    	prepared    chan struct{}
    	prepareErr  error
    }
    
    type PreparedStmtDB struct {
    	Stmts       map[string]*Stmt
    	PreparedSQL []string
    	Mux         *sync.RWMutex
    	ConnPool
    }
    
    func NewPreparedStmtDB(connPool ConnPool) *PreparedStmtDB {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 28 08:47:39 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  8. clause/where.go

    					if e, ok := v.Exprs[0].(Expr); ok {
    						sql := strings.ToUpper(e.SQL)
    						wrapInParentheses = strings.Contains(sql, AndWithSpace) || strings.Contains(sql, OrWithSpace)
    					}
    				}
    			case AndConditions:
    				if len(v.Exprs) == 1 {
    					if e, ok := v.Exprs[0].(Expr); ok {
    						sql := strings.ToUpper(e.SQL)
    						wrapInParentheses = strings.Contains(sql, AndWithSpace) || strings.Contains(sql, OrWithSpace)
    					}
    				}
    			case Expr:
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  9. callbacks.go

    	}
    
    	for _, f := range p.fns {
    		f(db)
    	}
    
    	if stmt.SQL.Len() > 0 {
    		db.Logger.Trace(stmt.Context, curTime, func() (string, int64) {
    			sql, vars := stmt.SQL.String(), stmt.Vars
    			if filter, ok := db.Logger.(ParamsFilter); ok {
    				sql, vars = filter.ParamsFilter(stmt.Context, stmt.SQL.String(), stmt.Vars...)
    			}
    			return db.Dialector.Explain(sql, vars...), db.RowsAffected
    		}, db.Error)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 8.6K bytes
    - Viewed (1)
  10. src/main/java/org/codelibs/core/sql/ResultSetUtil.java

     * governing permissions and limitations under the License.
     */
    package org.codelibs.core.sql;
    
    import static org.codelibs.core.log.Logger.format;
    import static org.codelibs.core.misc.AssertionUtil.assertArgumentNotNull;
    
    import java.sql.ResultSet;
    import java.sql.SQLException;
    
    import org.codelibs.core.exception.SQLRuntimeException;
    import org.codelibs.core.log.Logger;
    
    /**
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.9K bytes
    - Viewed (0)
Back to top