Skip to content

Commit 57492cc

Browse files
committed
TDengine first commit
0 parents  commit 57492cc

File tree

392 files changed

+129806
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

392 files changed

+129806
-0
lines changed

.clang-format

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: Google
4+
AccessModifierOffset: -1
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: true
8+
AlignEscapedNewlinesLeft: true
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: true
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: All
15+
AllowShortIfStatementsOnASingleLine: true
16+
AllowShortLoopsOnASingleLine: true
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakAfterReturnType: None
19+
AlwaysBreakBeforeMultilineStrings: true
20+
AlwaysBreakTemplateDeclarations: true
21+
BinPackArguments: true
22+
BinPackParameters: true
23+
BraceWrapping:
24+
AfterClass: false
25+
AfterControlStatement: false
26+
AfterEnum: false
27+
AfterFunction: false
28+
AfterNamespace: false
29+
AfterObjCDeclaration: false
30+
AfterStruct: false
31+
AfterUnion: false
32+
BeforeCatch: false
33+
BeforeElse: false
34+
IndentBraces: false
35+
BreakBeforeBinaryOperators: None
36+
BreakBeforeBraces: Attach
37+
BreakBeforeTernaryOperators: true
38+
BreakConstructorInitializersBeforeComma: false
39+
ColumnLimit: 120
40+
CommentPragmas: '^ IWYU pragma:'
41+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
42+
ConstructorInitializerIndentWidth: 4
43+
ContinuationIndentWidth: 4
44+
Cpp11BracedListStyle: true
45+
DerivePointerAlignment: true
46+
DisableFormat: false
47+
ExperimentalAutoDetectBinPacking: false
48+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
49+
IncludeCategories:
50+
- Regex: '^<.*\.h>'
51+
Priority: 1
52+
- Regex: '^<.*'
53+
Priority: 2
54+
- Regex: '.*'
55+
Priority: 3
56+
IndentCaseLabels: true
57+
IndentWidth: 2
58+
IndentWrappedFunctionNames: false
59+
KeepEmptyLinesAtTheStartOfBlocks: false
60+
MacroBlockBegin: ''
61+
MacroBlockEnd: ''
62+
MaxEmptyLinesToKeep: 1
63+
NamespaceIndentation: None
64+
ObjCBlockIndentWidth: 2
65+
ObjCSpaceAfterProperty: false
66+
ObjCSpaceBeforeProtocolList: false
67+
PenaltyBreakBeforeFirstCallParameter: 1
68+
PenaltyBreakComment: 300
69+
PenaltyBreakFirstLessLess: 120
70+
PenaltyBreakString: 1000
71+
PenaltyExcessCharacter: 1000000
72+
PenaltyReturnTypeOnItsOwnLine: 200
73+
PointerAlignment: Right
74+
ReflowComments: true
75+
SortIncludes: true
76+
SpaceAfterCStyleCast: false
77+
SpaceBeforeAssignmentOperators: true
78+
SpaceBeforeParens: ControlStatements
79+
SpaceInEmptyParentheses: false
80+
SpacesBeforeTrailingComments: 2
81+
SpacesInAngles: false
82+
SpacesInContainerLiterals: true
83+
SpacesInCStyleCastParentheses: false
84+
SpacesInParentheses: false
85+
SpacesInSquareBrackets: false
86+
Standard: Auto
87+
TabWidth: 8
88+
UseTab: Never
89+
...
90+

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
build/
2+
.vscode/
3+
.idea/
4+
cmake-build-debug/
5+
cscope.out
6+
.DS_Store
7+
debug/
8+
release/
9+
target/
10+
debs/
11+
rpms/
12+
*.pyc
13+
*.tmp

CMakeLists.txt

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
2+
PROJECT(TDengine)
3+
4+
SET(CMAKE_C_STANDARD 11)
5+
SET(CMAKE_VERBOSE_MAKEFILE ON)
6+
7+
#
8+
## generate debug version:
9+
## mkdir debug; cd debug; cmake -DCMAKE_BUILD_TYPE=Debug ..
10+
## generate release version:
11+
## mkdir release; cd release; cmake -DCMAKE_BUILD_TYPE=Release ..
12+
#
13+
14+
#set macro definitions
15+
ADD_DEFINITIONS(-D_REENTRANT -D_M_X64 -D__USE_POSIX -D_LIBC_REENTRANT)
16+
17+
#set macro definitions according to os platform
18+
IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR UNIX)
19+
ADD_DEFINITIONS(-DLINUX -D_LINUX)
20+
ENDIF ()
21+
22+
#set debug & release related options
23+
SET(COMMON_FLAGS "-Wall -fPIC -malign-double -Wno-char-subscripts -malign-stringops -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE")
24+
SET(COMMON_CXX_FLAGS "${COMMON_FLAGS} -std=c++11")
25+
SET(DEBUG_FLAGS "-O0 -DDEBUG")
26+
27+
#compiler debug options
28+
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMMON_FLAGS} ${DEBUG_FLAGS}")
29+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS} ${DEBUG_FLAGS}")
30+
31+
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${COMMON_FLAGS}")
32+
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${COMMON_CXX_FLAGS}")
33+
34+
MESSAGE(STATUS "Project source directory: " ${PROJECT_SOURCE_DIR})
35+
36+
IF (${CMAKE_BUILD_TYPE} MATCHES "Release")
37+
MESSAGE(STATUS "Build Release Version")
38+
ELSE ()
39+
SET(CMAKE_BUILD_TYPE "Debug")
40+
MESSAGE(STATUS "Build Debug Version")
41+
ENDIF ()
42+
43+
#set output directory
44+
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/lib)
45+
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/bin)
46+
SET(TESTS_OUTPUT_DIR ${PROJECT_BINARY_DIR}/build/test)
47+
48+
MESSAGE(STATUS "Project binary output path: " ${PROJECT_BINARY_DIR})
49+
MESSAGE(STATUS "Executable files output path: " ${EXECUTABLE_OUTPUT_PATH})
50+
MESSAGE(STATUS "Project library output path: " ${LIBRARY_OUTPUT_PATH})
51+
52+
# check for x64 platform
53+
IF (${CMAKE_SIZEOF_VOID_P} MATCHES 8)
54+
MESSAGE(STATUS "Check targe platform x64, pass")
55+
ADD_SUBDIRECTORY(deps)
56+
ADD_SUBDIRECTORY(src)
57+
ADD_SUBDIRECTORY(tests)
58+
ELSE ()
59+
MESSAGE(FATAL_ERROR "Check targe platform x86, not supported yet")
60+
ENDIF ()
61+
62+
SET(MAKE_INSTALL_SH "${PROJECT_SOURCE_DIR}/packaging/tools/make_install.sh")
63+
INSTALL(CODE "MESSAGE(\"make install script: ${MAKE_INSTALL_SH}\")")
64+
INSTALL(CODE "execute_process(COMMAND chmod 777 ${MAKE_INSTALL_SH})")
65+
INSTALL(CODE "execute_process(COMMAND ${MAKE_INSTALL_SH} ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR})")

CODE_OF_CONDUCT.md

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Contributor Covenant Code of Conduct
2+
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](code_of_conduct.md)
3+
4+
5+
## Our Pledge
6+
7+
In the interest of fostering an open and welcoming environment, we as
8+
contributors and maintainers pledge to making participation in our project and
9+
our community a harassment-free experience for everyone, regardless of age, body
10+
size, disability, ethnicity, sex characteristics, gender identity and expression,
11+
level of experience, education, socio-economic status, nationality, personal
12+
appearance, race, religion, or sexual identity and orientation.
13+
14+
## Our Standards
15+
16+
Examples of behavior that contributes to creating a positive environment
17+
include:
18+
19+
* Using welcoming and inclusive language
20+
* Being respectful of differing viewpoints and experiences
21+
* Gracefully accepting constructive criticism
22+
* Focusing on what is best for the community
23+
* Showing empathy towards other community members
24+
25+
Examples of unacceptable behavior by participants include:
26+
27+
* The use of sexualized language or imagery and unwelcome sexual attention or
28+
advances
29+
* Trolling, insulting/derogatory comments, and personal or political attacks
30+
* Public or private harassment
31+
* Publishing others' private information, such as a physical or electronic
32+
address, without explicit permission
33+
* Other conduct which could reasonably be considered inappropriate in a
34+
professional setting
35+
36+
## Our Responsibilities
37+
38+
Project maintainers are responsible for clarifying the standards of acceptable
39+
behavior and are expected to take appropriate and fair corrective action in
40+
response to any instances of unacceptable behavior.
41+
42+
Project maintainers have the right and responsibility to remove, edit, or
43+
reject comments, commits, code, wiki edits, issues, and other contributions
44+
that are not aligned to this Code of Conduct, or to ban temporarily or
45+
permanently any contributor for other behaviors that they deem inappropriate,
46+
threatening, offensive, or harmful.
47+
48+
## Scope
49+
50+
This Code of Conduct applies within all project spaces, and it also applies when
51+
an individual is representing the project or its community in public spaces.
52+
Examples of representing a project or community include using an official
53+
project e-mail address, posting via an official social media account, or acting
54+
as an appointed representative at an online or offline event. Representation of
55+
a project may be further defined and clarified by project maintainers.
56+
57+
## Enforcement
58+
59+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
60+
reported by contacting the project team at [email protected]. All
61+
complaints will be reviewed and investigated and will result in a response that
62+
is deemed necessary and appropriate to the circumstances. The project team is
63+
obligated to maintain confidentiality with regard to the reporter of an incident.
64+
Further details of specific enforcement policies may be posted separately.
65+
66+
Project maintainers who do not follow or enforce the Code of Conduct in good
67+
faith may face temporary or permanent repercussions as determined by other
68+
members of the project's leadership.
69+
70+
## Attribution
71+
72+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
73+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
74+
75+
[homepage]: https://www.contributor-covenant.org
76+
77+
For answers to common questions about this code of conduct, see
78+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Contributing
2+
3+
We appreciate contributions from all developers. Feel free to follow us, fork the repository, report bugs and even submit your code on GibHub. However, we would like developers to follow our guides to contribute for better corporation.
4+
5+
## Report bugs
6+
7+
Any users can report bugs to us through the [github issue tracker](https://github.com/taosdata/TDengine/issues). We appreciate a detailed description of the problem you met. It is better to provide the detailed steps on reproducing the bug. Otherwise, an appendix with log files generated by the bug is welcome.
8+
9+
## Sign the contributor license agreement
10+
11+
It is required to sign the Contributor Licence Agreement(CLA) before a user submitting your code patch. Follow the [TaosData CLA](https://www.taosdata.com/en/contributor/) link to access the agreement and instructions on how to sign it.
12+
13+
## Submit your code
14+
15+
Before submitting your code, make sure to [sign the contributor license agreement](#sign-the-contributor-license-agreement) beforehand. Your submission should solve an issue or add a feature registered in the [github issue tracker](https://github.com/taosdata/TDengine/issues). If no corresponding issue or feature is found in the issue tracker, please create one. When submitting your code to our repository, please create a pull request with the issue number included.

0 commit comments

Comments
 (0)