Files
mock/rows_column_type.go
zeekay bdc69767ca debrand: rename the connection mock files and rewrite README for this fork
clickconnmock.go becomes conn.go, matching every other file in the package.

The README still described the upstream module throughout — its install path,
import block and constructor. It now documents this fork's actual API
(NewDatastoreNative, ExpectQueryRow/WillReturnRow), and the example was compiled
and run as a test rather than written by hand.

Provenance is recorded honestly: this fork was cut from upstream's v0.13.0, the
latest upstream RELEASE TAG. The v0.14.x tags this repo carries correspond to no
upstream release — 'git ls-remote --tags' upstream returns v0.1.0 through
v0.13.0 and no v0.14 at all. Existing tags are left in place so nothing pinning
them breaks; the README now states the real base.

Earlier provenance comments pointed at github.com/ClickHouse/datastore-go, which
returns 404. They now reference the real counterpart files in
github.com/hanzo-ds/go, with the upstream commit SHAs dropped since those
commits do not exist in this fork.

Zero vendor references remain.
2026-07-26 11:52:21 -07:00

61 lines
1.6 KiB
Go

// Licensed to Datastore, Inc. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Datastore, Inc. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
// This file is a copy of the original file from github.com/hanzo-ds/go.
// The original file is located at:
// github.com/hanzo-ds/go, datastore_rows_column_type.go
package mock
import (
"reflect"
"github.com/hanzo-ds/go/lib/driver"
)
type columnType struct {
name string
dsType string
nullable bool
scanType reflect.Type
}
func NewColumnType(name string, dsType string, nullable bool, scanType reflect.Type) driver.ColumnType {
return columnType{
name: name,
dsType: dsType,
nullable: nullable,
scanType: scanType,
}
}
func (c columnType) Name() string {
return c.name
}
func (c columnType) Nullable() bool {
return c.nullable
}
func (c columnType) ScanType() reflect.Type {
return c.scanType
}
func (c columnType) DatabaseTypeName() string {
return c.dsType
}