dameng

package module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: LGPL-3.0 Imports: 16 Imported by: 0

README

Dameng

介绍

GoFrame版达梦驱动

Documentation

Overview

Package dameng implements gdb.Driver, which supports operations for database Kingbase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() gdb.Driver

New create and returns a driver that implements gdb.Driver, which supports operations for dameng.

Types

type Driver

type Driver struct {
	*gdb.Core
}

func (*Driver) ConvertValueForField

func (d *Driver) ConvertValueForField(_ context.Context, _ string, fieldValue interface{}) (interface{}, error)

ConvertValueForField converts value to the type of the record field.

func (*Driver) DoInsert

func (d *Driver) DoInsert(
	ctx context.Context, link gdb.Link, table string, list gdb.List, option gdb.DoInsertOption,
) (result sql.Result, err error)

DoInsert inserts or updates data for given table.

func (*Driver) GetChars

func (d *Driver) GetChars() (charLeft string, charRight string)

GetChars returns the security char for this type of database.

func (*Driver) New

func (d *Driver) New(core *gdb.Core, _ *gdb.ConfigNode) (gdb.DB, error)

New creates and returns a database object for dameng.

func (*Driver) Open

func (d *Driver) Open(config *gdb.ConfigNode) (db *sql.DB, err error)

Open creates and returns an underlying sql.DB object for dameng.

func (*Driver) Schema

func (d *Driver) Schema(schema string) *gdb.Schema

func (*Driver) TableFields

func (d *Driver) TableFields(ctx context.Context, table string, schema ...string) (fields map[string]*gdb.TableField, err error)

func (*Driver) Tables

func (d *Driver) Tables(ctx context.Context, schema ...string) (tables []string, err error)

Tables retrieves and returns the tables of current schema. It's mainly used in cli tool chain for automatically generating the models.

Directories

Path Synopsis
* Copyright (c) 2000-2018, 达梦数据库有限公司.
* Copyright (c) 2000-2018, 达梦数据库有限公司.
parser
* Copyright (c) 2000-2018, 达梦数据库有限公司.
* Copyright (c) 2000-2018, 达梦数据库有限公司.
security
This is a mirror of golang.org/x/crypto/internal/subtle.
This is a mirror of golang.org/x/crypto/internal/subtle.
util
* Copyright (c) 2000-2018, 达梦数据库有限公司.
* Copyright (c) 2000-2018, 达梦数据库有限公司.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL