Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Create directly without schema predefined #19

Merged
merged 5 commits into from
Feb 6, 2024
Merged

Conversation

yuanbohan
Copy link
Contributor

What's changed and what's your intention?

Client and StreamClient can Create body directly into GreptimeDB without schema predefined.

	monitors := []monitor{
		{
			ID:          randomId(),
			Host:        "127.0.0.1",
			Memory:      1,
			Cpu:         1.0,
			Temperature: -1,
			Ts:          time1,
			Running:     true,
		},
		{
			ID:          randomId(),
			Host:        "127.0.0.2",
			Memory:      2,
			Cpu:         2.0,
			Temperature: -2,
			Ts:          time2,
			Running:     true,
		},
	}

	resp, err := client.Create(context.Background(), monitors)

Checklist

  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (34f2874) 77.62% compared to head (b7eaa45) 76.76%.

Files Patch % Lines
client/client.go 62.50% 2 Missing and 1 partial ⚠️
client/stream_client.go 62.50% 2 Missing and 1 partial ⚠️
schema/schema.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
- Coverage   77.62%   76.76%   -0.87%     
==========================================
  Files           7        7              
  Lines         371      383      +12     
==========================================
+ Hits          288      294       +6     
- Misses         63       67       +4     
- Partials       20       22       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license-eye has totally checked 35 files.

Valid Invalid Ignored Fixed
22 2 11 0
Click to see the invalid file list
  • examples/schema/main.go
  • examples/tag/main.go

examples/schema/main.go Outdated Show resolved Hide resolved
examples/tag/main.go Outdated Show resolved Hide resolved
@yuanbohan yuanbohan merged commit b3ab66a into main Feb 6, 2024
5 checks passed
@yuanbohan yuanbohan deleted the write-pojo branch February 6, 2024 09:22
This was referenced Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants