database

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

* @Date: 2024-09-07 20:46:04 * @LastEditTime: 2024-12-14 16:50:00 * @Description: Interact with database

Index

Constants

View Source
const (
	SQLITE_MAX_IDLE_CONNS int = 10
	SQLITE_MAX_OPEN_CONNS int = 100
	BATCH_SIZE                = 500
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GitMetrics

type GitMetrics struct {
	// gorm.Model
	Name             string    `gorm:"column:_name;not null"`
	Owner            string    `gorm:"column:_owner;not null"`
	Source           string    `gorm:"column:_source;not null"`
	URL              string    `gorm:"column:git_link;not null"` //* `gorm:"unique;not null"`
	License          string    `gorm:"column:license;not null"`
	Ecosystems       string    `gorm:"column:ecosystem;not null"`
	Languages        string    `gorm:"column:languages;not null"`
	CreatedSince     time.Time `gorm:"column:created_since;not null"`
	UpdatedSince     time.Time `gorm:"column:updated_since;not null"`
	ContributorCount int       `gorm:"column:contributor_count;not null"`
	OrgCount         int       `gorm:"column:org_count;not null"`
	CommitFrequency  float64   `gorm:"column:commit_frequency;not null"`
	NeedUpdate       bool      `gorm:"column:need_update;not null"`
}

func NewGitMetrics

func NewGitMetrics(
	Name, Owner, Source, URL, License, Languages string,
	Ecosystems string,
	CreatedSince, UpdatedSince time.Time,
	ContributorCount, OrgCount int,
	CommitFrequency float64,
	NeedUpdate bool,
) GitMetrics

func Repo2Metrics

func Repo2Metrics(r *git.Repo) GitMetrics

Directories

Path Synopsis
* @Date: 2024-09-07 16:30:21 * @LastEditTime: 2024-11-27 20:22:56 * @Description:
* @Date: 2024-09-07 16:30:21 * @LastEditTime: 2024-11-27 20:22:56 * @Description:
* @Date: 2024-09-07 20:07:35 * @LastEditTime: 2024-12-14 16:37:38 * @Description:
* @Date: 2024-09-07 20:07:35 * @LastEditTime: 2024-12-14 16:37:38 * @Description:

Jump to

Keyboard shortcuts

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